I'm sure this has been covered before, but if your web server is set
to compress javascript automatically, is it worth it to pack jquery.js
with the extra time spent unpacking?

Simple case in point:

Start with the packed jquery.js and a jsmin-izied jquery-min.js:

Size in bytes before gzip:

20976 jquery.js
33784 jquery-min.js

Size after command line gzip:

10776 jquery.js.gz
10702 jquery-min.js.gz

The compression results are a little surprising, but negligible.  The
difference is that javascript won't spend valuable milliseconds
unpacking when your web page is first loaded.  It's much faster to
uncompress (native code) vs. unpack (javascript).

Steve

Reply via email to