Monday, January 30th, 2006
Hosting JavaScript on CDNs? AOL announces the hosting of Dojo
<p>Back in December we talked about hosting JavaScript on CDNs.If a thousand applications that your browser has accessed use Dojo or Prototye (or ...), then you have many copies of the same file. Wouldn't it be nice to have these on a CDN and have that take care of it?
We even wanted versioning to be built in, a la maven:
-
-
dojo.require("dojo.io.*", "0.3");
-
or:
-
-
<script type="text/javascript" src="http://cdn/getlibrary?name=dojo-kitchen-sink&version=0.3"></script>
-
Well, it turns out that this isn't pie in the sky as AOL is now offering the Dojo Toolkit.
How did this come about?
AOL recently launched a site called I Am Alpha which builds on web standards and your IM network to build and host and lightweight widgets in customzied “container� pages. Think of it as a personalized homepage++; not only can you customize based on the widgets they provide, you can easily construct your own!
I Am Alpha “widgets� are just HTML, CSS, and JavaScript pages that conform to a new microformat. It’s standards-based personal publishing and aggregation on a grand scale. To that end, AOL has selected Dojo as one of the libraries available for use with the platform and put the Ajax build of Dojo 0.2.2 in their Content Distribution Network.
You can use the AOL CDN via:
-
-
<script type='text/javascript'>
-
djConfig = {
-
// your local src/ directory is located at domain.com/path/to/local/dojo-0.2.2-ajax/src/
-
baseRelativePath: '/path/to/local/dojo-0.2.2-ajax/'
-
};
-
</script>
-
<script type='text/javascript'
-
src='http://o.aolcdn.com/iamalpha/.resource/jssdk/dojo-0.2.2/dojo.js'></script>
-
<script type='text/javascript'>
-
// pull in the storage APIs
-
dojo.require('dojo.storage.*');
-
// or the JSON utilities
-
dojo.require('dojo.json');
-
</script>
-
Very cool indeed.
Related Content:











and CDN stands for?….
Last sentence before code: Content Distribution Network.
[...] Shawn Carnell (one of the folks behind AOL’s coolio modules stuff (see Iamalpha) reports that they met with the Ajaxian dudes. [...]
So what happens when they go down?
Well, I’ve not done an exaustive study but since you supply a url from your website as well as the CDN, I’m guessing that it falls back on your site?
=C=
CDN’s by nature normally don’t go down.
[...] Here is a list of links that I bookmarked in recent few week about AJAX and related technologies. Hosting JavaScript on CDNs? AOL announces the hosting of Dojo Javascript libraries roundup Dojo Framework Roadmap (pro inspiraci) Preloading Data with Ajax and JSON [...]
Anyone know if they are going to put .3 up on the CDN?..With the xDomain support?…
Well, I’ve not done an exaustive study but since you supply a url from your website as well as the CDN, I’m guessing that it falls back on your site?
thanks
Great! =)
No thanks, Russian, I went looking for a nerdy girl with good database skills, and long since found and married her.
Now back on topic — found this looking for that definintion of “CDN” (meaning something like Akamai, that holds copies of big commercial web pages like Apple’s and serves them out, saving the company the risk and trouble of hosting all their own pages themselves — right?)
Because I saw this:
http://seclists.org/bugtraq/2007/Nov/0284.html
Banks (Wellsfargo.com) using CDNs to deliver Javascript: enables password theft by anyone compromising or controlling the CDN