Forum Moderators: open

Message Too Old, No Replies

where does you load your js libraries from? google, ms, yahoo?

         

jamie

8:37 pm on May 21, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi,

up until recently i loaded my primary javascript library (jquery) from google's cdn network. i've never had an outage, and i personally can't tell the difference between having it on theirs or ours.

but after reading jim's post here [webmasterworld.com...] which explains the fact that expires headers over 2 weeks are basically superfluous, surely that completely negates the benefits of hosting the library elsewhere.

since then i host it on my own servers (gzipped and minified). it should save a few miliseconds of look up for google's servers and i still serve it with an expires of a month (just in case ;)

interested in other people's practices?

Fotiman

9:10 pm on May 21, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There are other benefits to hosting elsewhere. For example, files hosted on a CDN may be closer to the client browser than your servers (assuming your site is not also hosted on a CDN), which should provide faster download of the files. Also, if you were using a common library like jQuery or YUI and you're using the hosted versions, there is a greater chance that someone might have visited another site that used those files, and therefore won't need to download them at all and can use the browser cached version. Just some things to consider.