jquery-1.4.2.min.js is 71.8KB Same file compressed through this tool, with gzip enabled, becomes 32.9 KB
Which is better? If latter, why doesn't jQuery provide a packed file too instead of just uncompressed and min versions?
My Question: One is minified and gzip enabled, other is minified and packed and gzip enabled. Which should I use? If the one thats 32KB, I wonder why doesn't jquery provide a minified+packed version instead, any particular reason why?
Thanks
It's not an either question, use both, serve the minified file, over a gzip stream to the browser for the best/quickest delivery possibly.
Most web servers and almost every current browser support gzip. You're serving the minified file, with internal variables shortened etc...but then deliverying a zipped version of that to the client. By doing this you're delivering the minimum amount of javascript for the client to execute and delivering the smallest payload...so a quicker download for your user.
Also, remember to set cache headers so the client's not re-fetching the file...and there are other performance tips to go along with this you should read :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With