views:

164

answers:

6

is there any way to compress more jquery base file? what i have is about 56K and i need a more light file because of dial-up speed(56k).

+2  A: 

jquery 1.4 compressed with JSMin is close to 56K. packer by dean edwards generally gives a little better compression but would take longer to decompress on client side. you can compare both at jscompress haven't seen jquery compressed with closure being used anywhere. Personally I'd go with JSMin and serve with gzip compression. That brings it down to ~23K

Gunjan
+1  A: 

http://www.google.ru/search?hl=ru&q=compress+javascript&btnG=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA+%D0%B2+Google&lr=

There are a lot of technics to compress js-files. You should start with downloading the min-version of jquery files - http://code.jquery.com/jquery-1.4.2.min.js.

You can also think about reducing your websites size

VMAtm
+1  A: 

Check if your server compresses Javascript files (e.g. with this tool).

piquadrat
+2  A: 

You can also use the ones hosted by Google, even uncompressed. The users probably have them loaded in their browser's cache, so they're not downloaded at all on your site.

http://code.google.com/apis/ajaxlibs/documentation/#jquery

Adirael
+1  A: 

You can use different minifiers to get slightly different results, and let the server use gzip to compress the files.

Google hosts the library, so you can use their server and hope that the users already have the file in the cache.

However, the download time of the library will still be at least three seconds over a 56k modem. It's not a light-weight library, if you use it you have to accept the extra load. Consider if you need it, or if plain Javascript would be a better solution.

Guffa
+2  A: 

You can also check the The JavaScript CompressorRater and see how different tools will compress jQuery. The rule of thumb however is to enable GZIP compression for browsers that support it.

korchev