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 woul开发者_StackOverflowd like to do some tests to find out.
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.
精彩评论