Are there a minified/compressed versions of the jQuery UI CSS themes on Google's CDN?
Asked Answered
D

5

17

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/jquery-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?

Deportation answered 6/11, 2010 at 5:9 Comment(3)
What's purpose would it achieve? Once the file is pulled down to the client once, it should be hitting the client's cache for quite awhile. And ideally your site won't be the one that has to make the initial pull.Hamrick
Yes, ideally, but because the CSS are specific for each theme, the chances are pretty high. Having a smaller version of the file would save initial load time. The minified version is ~8K smaller. Not big for broadband, but for dial-up or mobile, that could be a second or 2.Deportation
also think that CSS can't be packed the same way JavaScript can, and the server gzipping can to almost the same efect on CSS filesInbound
S
6

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...

Sprinkling answered 6/11, 2010 at 5:22 Comment(0)
R
6

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.

Robespierre answered 6/11, 2010 at 5:23 Comment(0)
C
5

Google now has the minimized version of JQuery:

https://developers.google.com/speed/libraries/devguide#jquery-ui

It is down from 440k to 223k

Chalfant answered 7/3, 2013 at 20:56 Comment(0)
S
3

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

Succession answered 11/3, 2015 at 13:34 Comment(0)
D
2

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.

Dochandorrach answered 6/11, 2010 at 5:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.