0

I wanted to use some functionality in jQuery-UI. So, I downloaded a custom version of the same from jQuery website, including only those things in my download that were needed by me. This was supposed to trim down the total size of my page, but to my surprise, the page size remained almost the same even after following the procedure provided at jQuery website.

Did I do something wrong? Or is this the expected behaviour?

c0da
  • 1,009
  • 3
  • 14
  • 28
  • try using min version of the file. It will be reducing the size. but yes you cannot modify that file. you can compress it and use. – Murtaza Feb 24 '12 at 07:13
  • I downloaded the stable version from jQuery website. The min version is ~200kb! I don't want all that jQuery UI. I just needed 1 thing from it. – c0da Feb 24 '12 at 07:18
  • so you want to use the tires, and throw the rest of the car away? – Muad'Dib Feb 24 '12 at 07:43
  • you can use any of the online compressor to complress your file size – Murtaza Feb 24 '12 at 08:05

1 Answers1

2

You should have a look at JQuery UI Packager, it lets you pick what functionality you want.
It bundles it up with both a custom and a minified JQuery.
When I tried it, I removed everything but core functionality, and it ended up 15kb uncompressed.

Proof

Then I tried it without removing anything, it ended up 206kb uncompressed.

Proof2

If you're that concerned you should think about gzipping. Look at this chart of filesizes and how they improve with the different methods.

Here's a post about a guy asking a similar question, and the answer explains what you should focus on. Here's a discussion about gzip and minify.

Community
  • 1
  • 1
ShadowScripter
  • 7,314
  • 4
  • 36
  • 54