Monday, June 11, 2012

Do browsers parse javascript on every page load?


Do browsers (IE and Firefox) parse linked javascript files every time the page refreshes?



They can cache the files, so I'm guessing they won't try to download them each time, but as each page is essentially separate, I expect them to tear down any old code and re-parse it.



This is inefficient, although perfectly understandable, but I wonder if modern browsers are clever enough to avoid the parsing step within sites. I'm thinking of cases where a site uses a javascript library, like ExtJS or jQuery, etc.


Source: Tips4all

No comments:

Post a Comment