Wednesday, November 29th, 2006
Including Dojo via the AOL CDN
AOL has been hosting Dojo builds for awhile, but now Alex Russell has:
constructed a couple of very small “wrapper†files that will let you include the “Ajax†build of Dojo from various versions through the cross-domain loader.
Including the latest stable Dojo couldn’t be simpler:
<script src="http://download.dojotoolkit.org/dojo_0.3.1.js"></script>It’s also trivial to test out the latest 0.4.1 Release Candidate:
<script src="http://download.dojotoolkit.org/dojo_0.4.1rc2.js"></script>That’s all there is to it!
From here on in, your pages can use the
dojo.require()system to pull in anything that’s part of the “stock†distribution, and by following James’ detailed documentation and test page, you can also load your own custom packages while still loading the main system from a separate domain.
Imagine if lots of people did this. Browser cache happy.












The cache will be happy, but I doubt that one would like to relay in such a way on a service with an availability that can’t be controlled. For testing purposes and experimenting it’s great – no question.
I wonder if it would be possible to have it included by deafult, but fall back onto a local copy if it isnt available. Now that would make it totally viable.
Cool stuff! Just this week I posted a blog about doing this same thing with Flex. I also go over some of the caveats of this technique, like lack of failover, lack of integrity, etc. I do think these problems can be solved, but for now this technique is best used for demos.
Pass4sure is an expert in providing the most valuable training materials for IT certification exams, equipped with accurate exam questions and verified answers, considerate & warmhearted service and complete safeguard measures. The Affiliate Program is a marketing strategy that Pass4sure adopts to assemble more dealers for propaganda and profit.The Most Popular exams List :642-446HP0-J33 350-030 BH0-004 TK0-201 HP0-J33 642-357 1Z0-051 640-802 PMI-001 646-985 646-985JN0-342 JK0-016 642-825 640-822 JN0-342 350-001-LAB 642-062 HP0-J22 642-642 132-S-900.7 640-802 Click Passforsure to get more information!