Re:Don't wait for "DOM ready" for your app to start
by IgorPartola on Friday June 08, 2012 @07:16PM
(#4086584)
Some things you could do would include firing off XHR's and creating an unattached hierarchy of DOM nodes which could then be attached once the main DOM is ready. This could be neat.
[ Parent
| on HN ]
Re:Don't wait for "DOM ready" for your app to start
by mikeryan on Friday June 08, 2012 @10:37PM
(#4086988)
Why would you use XHR for this instead of just bootstrapping with all the DOM nodes in place. This sounds like it would slow the page down.
Twitter is just going through a complete re-arch of their front end to stop loading via XHR and says they're getting a 5x speed improvement
http://www.digitaltrends.com/social-media/twitter-kills-the-...
Re:Don't wait for "DOM ready" for your app to start
by IgorPartola on Saturday June 09, 2012 @12:33AM
(#4087197)
Normally, I am a big fan of putting everything into one HTTP response. However, if you do need to load things asynchronously, fire off as many requests as early as possible. For example, if you are showing some kind of real-time data and need to get the first batch in as quickly as possible, you might not want the complexity of two different ways of delivering the same data just to get the initial page speedup.