3 ms·
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 read
by IgorPartola 14y ago
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.
- mikeryan 14y agoWhy 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-hashbang-promises-5x-faster-page-loads/ http://www.digitaltrends.com/social-media/twitter-kills-the-...
- IgorPartola 14y agoNormally, 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.