views:

32

answers:

1

Hi,

Usually you don't want to include the whole of jquery ui as you are only using certain parts. Using google cdn, it is possible to include different parts of the CSS files, but I can't find the JS ones eg (jquery.ui.core.min.js).

CSS: http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/base/jquery.ui.core.css

http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/ui-darkness/jquery.ui.theme.css http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/ui-darkness/jquery.ui.dialog.css

JS:

?

I have tried looking in all the obvious places I can think of. Do they exist?

EDIT2:

I have created http://code.google.com/p/google-ajax-apis/issues/detail?id=490 addressing this.

EDIT:

Np Josiah.

Overall I think it should be faster in my circumstances.

Most users of the site will be on IE6 which limits to 2 concurrent requests per domain. Offloading these requests to a different domain frees up other requests and should be faster than serving them up myself.

Plus once they are cached, the check for modified is on another domain, which I think is also going to be better than checking the same domain as the other files. Then there are benefits of having servers close to users and so forth.

I also suspect that jqueryui is not that cached when compared to jquery, especially considering my users. There is also the chance that they have the js parts cached if other websites are using them.

I am not convinced that it will be faster, but I would like to do some tests to find out.

+1  A: 

I can't find any mention of the individual parts in any of the CDN documentations.

However hotlinking to individual components destroys one of the main advantages to linking to a CDN, which is caching. Users who have visited other sites that also use jQueryUI will have a cached copy of google's full jQuery.min.js file and if you were to hotlink to a minimal piece of the UI then you would actually experience a performance hit as the user is required to download a new file. At this point you might as well host the individual pieces on your website.

Josiah
I am not looking for all the js but the individual components. eg core, dialog, position, etc. You get it as part of the development bundle when you download from jqueryui.com
Alistair
That'll teach me to answer too quickly. My apologies. I've edited my answer.
Josiah
Yeah me too, but I couldn't find any documentation of the individual css parts either but I found them eventually, so hoping they js is there too.
Alistair