logo

Shifting DEXT to Google's CDN for Ajax APIs

One of the things holding me back from making DEXT available (apart form lack of time) was knowing the best way to deploy it. Because of the mix of JavaScript libraries in use (Prototype, DOJO, Mootools and jQuery) I had put all the files in a DB called toolkits.nsf which I bundled in to the download.

The trouble is that it made the additional database ~120MB and the Zipped download 25MB. Not that that's much by today's standards, but it made uploading new releases a bit of a pain for me.

To get round this I've opted to load all the various JavaScript libraries from Google's Ajax API "CDN". If you look again at the source code for a demo form on the app you'll see the libraries loaded like so:

<script src="//ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js" type="text/javascript"></script>

Note the lack of "http:" from the URL. This allows you to switch to and from using SSL without worrying about "mixed content".

You can read mode about the benefits of using a third-party CDN in this write-up.

While I have my reservations about doing it this way I just think it makes the most sense. It's just a shame there's no hosted version of Ext. Apparently there never will be as Google don't want to host anything with less than a completely open licence.

My "codestore time" for today has been spent moving to this new way of doing things, so you'll have to wait another day for the download. I still need to work out how to provide it without the 1,000s of demo documents currently in it but with enough to make the demos work.

Comments

    • avatar
    • RG
    • Thu 4 Dec 2008 05:26 AM

    > "It's just a shame there's no hosted version of Ext."

    And what about : http://extjs.com/blog/2008/11/18/ext-cdn-custom-builds-compression-and-fast-performance/ ?

    • avatar
    • Jake Howlett
    • Thu 4 Dec 2008 05:41 AM

    Good point!

    I meant on Google's CDN, but I don't suppose it matters. There's no reason to trust Google any more then cachefly.com.

    DEXT doesn't have an Ext-based demo (yet) but it's good to know it's an option.

    Jake

  1. I have a strange problem with these Google hosted libs. Being behind a firewall the loading is slowed down to about 1byte/s.

    Maybe there is some SynFlood defense activated in our firewall? I cannot use DEXT any more. Also I could not load other sites like ittoolbox.com any more. Now I made a download of jquery API from Google (took 2 hours!!). After having it in my cache I can use ittoolbox.com again. But DEXT uses other libs which I do not have in my cache at the moment.

    Although this is a local problem for me I also found some discussions on Google where other people had the same problem. Also AdBlock or NoScript can cause this kind of problems (but then the libs are not loaded at all...)

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Thu 4 Dec 2008

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

Elsewhere

Here are the external links posted on the same day.

More links are available in the archive »

More Content