4 ms·
This reads like a very good list of things to implement in your SPA. Having said that, you should also be supporting simply rendering the pages on the first re
by zkhalique 11y ago
This reads like a very good list of things to implement in your SPA.
Having said that, you should also be supporting simply rendering the pages on the first request, and progressively enhance it, rather than a blank thing that then goes and fetches all the JS and render itself. The HTML/CSS should arrive and render as soon as possible. His reference to twitter's 2012 writeup is good.
Having said that, take a look at this:
http://platform.qbix.com/guide/pages http://platform.qbix.com/guide/pages
In our framework, we've always supported the concept of Pages and Tools (components to put on the pages). We handle all the swapping of CSS/JS, loading what you need only on demand, caching (even in the phonegap bundle!), retaining tools you still need while pages get replaced (instead of re-constructing them expensively from scratch every time). And of course removing event listeners for tools and pages which have been unloaded.
Ideally, all your pages should be cacheable to the point of being static, with dynamic content being populated by JS.
Also there is a security implication with CSRF. If you use a nonce in the session to prevent CSRF then this nonce has to be delivered to the client, either with the first page rendering, or -- if the page is cached -- on subsequent requests.
The point is ... it takes a long time to build all the supporting technology. We've done it. But it took us years!
You can check out an SPA here on desktop, tablet or mobile:
http://qbixstaging.com/Groups http://qbixstaging.com/Groups