Hacker News new | past | comments | ask | show | jobs | submit login

I guess this is the key part:

> On an iPhone 2.2 device, 200k of JavaScript held within a block comment adds 240ms during page load, whereas 200k of JavaScript that is parsed during page load added 2600 ms. That's more than a 10x reduction in startup latency by eliminating 200k of unneeded JavaScript during page load! Take a look at the code sample below to see how this is done.

But once again this is an issue of when to eval the code, not when to load it. Put the script tag at the end of the page, so that it gets eval'ed after most of the page is already built.




That does not stop it from parsing, so even though the page is rendered, it is not interactive.


I guess that's true. Still, XHR respects HTTP headers. You could request the code and immediately get it out of the browser cache if it is there. I see the problem they are trying to solve, but the solution is so obtuse I can't bring myself to using something like this.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: