Just watched the you tube video for it, turns out CDN is content delivery network, and it boils down the the fact Google is hosting the javscript libraries, and smartly caching them etc. this way there isn’t a performance issue for each page loading jQuery, dojo, prototype, etc. The libraries can belinked there and are minified etc. Hey why not.
sorry I thought it had something to do with AJAX methods.
Now I can link to compressed stylesheets at Yahoo (YUI) and point my JS to Google. Throw in some images hosted on S3 and I’m being very nice to my host.
Just took a look at this too. Found it from the link on Web Resources Depot and just can’t get it to work for the life of me. What exactly am I doing wrong?
I followed the advice on this page here and tried adding this code to a page :
Yep it was closed until I forgot to exchange the r in there for a *. The forum unfortunately caught me out on that one and stripped it out. Will go back and add it in for others reading.
I did see on their site that you can link directly but I think in doing it that way you don’t get all the clever caching methods and zipping / minifying stuff do you? Could be wrong though but I thought I had read that you don’t get them unless you are using the API?
Right without checking I would of just linked it in the head section, but if that doesn’t take advantage of the caching etc. then best to go with their methods. The script snippet you are using could be placed externally within the site though, would that effect the caching etc.? That would eliminate the chances of making a mistake in an embedded script on a page someplace.
You can access the libraries in two ways, and either way we take the pain out of hosting the libraries, correctly setting cache headers, staying up to date with the most recent bug fixes, etc.
Not sure why the direct link isn’t working for you (it works for me). But for the google.load() method, you’re not appending your Google API Key to the end of the source URI. That’s needed for that method to work.
Ahhh the API key, don’t they use that for some things to limit usage, like say if you are using feeds.
I don’t see them limiting the use of this api, but sometimes it’s the case if I remember correctly. Maps maybe they limit.
Not sure why the direct link isn’t working for you (it works for me). But for the google.load() method, you’re not appending your Google API Key to the end of the source URI. That’s needed for that method to work.
Well no actually the direct link does work fine but I’m pretty sure that you don’t get the zipped and minified versions if you do it in that way which is what I was looking for.
With reference to the google.load part I did actually place my API key in there as yes it does require it, sorry forgot to mention I had done that when I posted the code that I did above. Had copied that code directly from their site documentation but did see buried away on another page somewhere that to use the AJAX APIs you needed to specify the API key so have done that too.
All that isn’t working for me is the API google.load part. I can get a direct file to load with no problems but I’m pretty sure that I read on their (Google) site that if you do this then you don’t get the benefit of the zipped and minified code-bases?
All that isn’t working for me is the API google.load part. I can get a direct file to load with no problems but I’m pretty sure that I read on their (Google) site that if you do this then you don’t get the benefit of the zipped and minified code-bases?
Hmm…you can link directly to the minified version. Just link to
I’m pretty certain that I read on the Google site that if you use the direct link method then you don’t get all the added bells and whistles such as GZipped files (if the browser supports it) and also the minified scripts?
Each library is available via both google.load(), and directly via tag. The google.load() approach offers the most functionality and performance. In the sections that follow, we document all of the libraries that are available. For each library we list it’s name (as in the name used in google.load(), all of the versions that we have on hand for the library, etc.