4 ms·
I personally decided to use a local file after all. Pros: + I can cache it for a very long time, so all my returning visitors don't have re-download it. I was
by isalmon 13y ago
I personally decided to use a local file after all.
Pros:
+ I can cache it for a very long time, so all my returning visitors don't have re-download it. I was very surprised to see that CDN's jquery had a very short 'Expire' headers
+ If my server is up and users can open a web page - there's a very high chance that the .js file will load as well.
+ I can combine different jquery libraries/plugins into one file, so my page can load MUCH faster
Cons:
- It might load a little more slowly, because it's not on CDN.
Am I missing something?
- Encosia 13y agoThe Google CDN serves jQuery with a 365 day max-age as long as you reference a specific version (which you should be doing anyway). It only uses the shorter cache expiration, necessarily, if you want a "latest version" reference. More info here: http://encosia.com/the-crucial-0-in-google-cdn-references-to-jquery-1-x-0/ http://encosia.com/the-crucial-0-in-google-cdn-references-to...
- martin-adams 13y agoYou may also have to pay the bandwidth cost.