4 ms·
Google conveniently hosts and distributes most of the common Javascript libraries through their CDN, and allows external developers to load them using this tech
by michaelfairley 17y ago
Google conveniently hosts and distributes most of the common Javascript libraries through their CDN, and allows external developers to load them using this technique. http://code.google.com/apis/ajaxlibs/ http://code.google.com/apis/ajaxlibs/
- sant0sk1 17y agoHas anybody else noticed slower load times using Google's hosted libraries than their own?
- jacquesm 17y agoThis has nothing to do with googles hosted libraries but it is javascript loaded from google servers: I've had both analytics and adsense slow down page loads quite a bit. Analytics tags should always go as far to the end of the page as you can manage, with adsense tags you're bound to put them where they display the ad. 3rd party javascripts are a pain, it's an extra point of failure that is not under your control.
- bmelton 17y agoIf I'm not mistaken, at least Drupal has a module that allows you to host the google analytics JS files on your own server. This would lead me to believe that you can do that sans Drupal, though I've never attempted it (in either fashion actually.)
- jacquesm 17y agothank you, I'll have a look at that, that may be helpful!
- mrshoe 17y agoIt's probably faster to serve them off your own server due to HTTP keepalive. Sure, making a new connection to google's CDN might be faster than making a new connection to your server, but it's definitely not going to be faster than sending a little more data over an existing connection. Not to mention the extra DNS lookup.
- michaelfairley 17y agoThis is assuming that the script file and the page it's included in are coming off the same server. Most people who are tweaking performance at this level have probably already separated the serving of static and dynamic content.
- blasdel 17y agoThe idea is that if everyone uses the google-hosted jquery, it'll almost always be in the browser cache.