I am building a site which currently uses javascript from several sources:
Group 1: Google Maps API v3 (hosted by Google)
Group 2: jQuery & swfobject (hosted on Google CDN)
Group 3: Several jQuery plugins and non-jquery javascript files (hosted on my server)
I am using Justin Etheredge's tool SquishIt to combine and minify all the javascript files that are hosted on my server (group 3).
I am wondering if the site would 'feel' faster to users if I were to host the files in (group 2) locally so that they can be combined with all the other files in (group 3) and requiring only one HTTP request for groups 2 & 3. This would mean that I don't get the benefits of the Google CDN however.
Does anyone have any advice on this matter?
EDIT: Also, how would I come to a numbers based answer to this question? Is that possible?
I think it depends on how likely it is that your users already have the google cdn file cached from visiting another site that uses the same asset.
My opinion is that it's better to use CDN since it's minified and somewhat likely the file doesn't need to be downloaded at all. Combine and minify everything else.
I'd be interested to know the global cache hit-miss ratio for those google cdn library files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With