Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

One of the big tradeoffs in web development is on reducing the total size of your JS files to maintain page load times low. My reasonable guess is that most websites include a similar subset of JS files. Think about jQuery, YUI and other widely used libraries. Is there a reason for browsers not to have common libraries stored locally and save an unnecessary request and download time?

share|improve this question

closed as not constructive by grawity, Renan, 8088, Karan, Brad Patton May 13 '13 at 2:22

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
That's why, for example, developers can include jQuery from CDNs such as Google's libraries. –  slhck May 12 '13 at 18:24
    
unless your JS files are huge, load times are insignificant. –  Keltari May 12 '13 at 21:06
add comment

1 Answer

Because they have no way of knowing that http://somerandomsite.com/js/jquery.js is, in fact, the same version of jQuery that the browser has – or even jQuery at all.

share|improve this answer
    
An easy solution to this issue is allowing websites to "subscribe" to the feature and let the browser assume that it is pointing to the correct jQuery version. –  sazpaz May 12 '13 at 18:09
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.