Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Switch to SPA/XHR'd in model for non-SW experience #36

Open
addyosmani opened this issue Nov 6, 2015 · 1 comment
Open

Switch to SPA/XHR'd in model for non-SW experience #36

addyosmani opened this issue Nov 6, 2015 · 1 comment
Labels

Comments

@addyosmani
Copy link
Contributor

Atm, we revert to full static page reloads for browsers without Service Worker support. We can probably switch to a more SPA-like model without too much difficulty. We're otherwise opting for simplicity with the current approach with a focus on fast initial paint.

@addyosmani addyosmani added the P1 label Nov 6, 2015
@gauntface
Copy link

Starting looking into this and it's not too much work, the one thing I'm struggling to find a nice solution for is what the router does when it's initialised.

At the moment it assumes the body area of the web app is empty and that when a page is loaded it'll call onStart() on the pageController for that route, which will grab the partial HTML and load it.

For first render we want static content to be served, so there is no need for onStart to be called or for the partial to be loaded.

The most obvious solution is to add a class to the main body element of 'static-content-loaded' which the router will simply skip on the start step and perhaps call onUpdate instead.

Thoughts on this approach? @addyosmani @paullewis

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants