I know that Google has the CSS files for jQuery UI at the following location:
//ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/pepper-grinder/开发者_如何学JAVAjquery-ui.css
But I'm wondering if they serve the minified or compressed versions?
I tried a number of combinations similar to the way naming of the js files, but they all results in 404s.
Any ideas?
No, it does not seem to me, but I would advise you to ask this question on the dedicated group
Anyway, the provided versions seems already well optimized...
They don't have the minified version. Neither does the microsoft CDN have it. You wouldn't really need to compress it. If you really wanted to load faster, you need to include a custom package built on the jquery UI page to only include the features you need.
Google now has the minimized version of JQuery:
https://developers.google.com/speed/libraries/devguide#jquery-ui
It is down from 440k to 223k
Google's CDN website displays the minified version for js but unminified version for css: https://developers.google.com/speed/libraries/devguide#jqueryui
jQuery UI
snippet: <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
site: jqueryui.com
versions: 1.11.3, 1.11.2, 1.11.1, 1.11.0, 1.10.4, 1.10.3, 1.10.2, 1.10.1, 1.10.0, 1.9.2, 1.9.1, 1.9.0, 1.8.24, 1.8.23, 1.8.22, 1.8.21, 1.8.20, 1.8.19, 1.8.18, 1.8.17, 1.8.16, 1.8.15, 1.8.14, 1.8.13, 1.8.12, 1.8.11, 1.8.10, 1.8.9, 1.8.8, 1.8.7, 1.8.6, 1.8.5, 1.8.4, 1.8.2, 1.8.1, 1.8.0, 1.7.3, 1.7.2, 1.7.1, 1.7.0, 1.6.0, 1.5.3, 1.5.2
note: This library depends on jQuery. You must also load jQuery before loading this module. Version 1.8.3 is not hosted due to its short life, and the alias 1.8.3 actually loads 1.8.4.
For a minified css, use: https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.min.css
No, I believe Google only serves the files that are provided by the official download sites without any post-processing, and since that's what the provided CSS files look like, there isn't a "compressed" version.
Actually I don't believe you should load jQuery UI and it's associated CSS files from Google's CDN, since jQuery UI is modular, while loading the file from Google's CDN will load all of the modules, meaning that you'll be loading a bunch of unnecessary scripts and styles. Use the custom package builder from the jQuery UI downloads page instead to include only the modules you need should reduce filesizes much more than compressing the already highly compressed CSS file served through Google's CDN.
精彩评论