Skip to content

Compression Part 1: Packing, Minifying & GZipping JavaScript files

Hi Ya’ll,

Yep three posts bam smack near each other. In this one I just wish to be quick and give you some great resources for packing, minifying and GZipping your JavaScript files (I have to stop simply buffing out this post by simply reciting the heading, lol.) compressing your JavaScript files which obviously results in minimising the time in which these files can be sent to the end-user, resulting in quicker download times.

I was actually interested to know the official tools used ([1], [2]) by the JQuery team when they are packing and minifying their files, and they also seem to be the best tools on the market. See below:

  • JS MIN – The minification tool used by JQuery which is used to condense your javascript and remove whitespace.
  • Dean Edward’s Packer – The official packing/obfuscation tool used by JQuery and looks pretty good. It goes one step further by minifying and also “obfuscating” the code, which serves two purposes, generally by concealing the underling code to an unreadable, uninterpretable state by a human and also making it more ambigious. This also results in great compression though and serves well for download times. However performance appears to be detrimental when served with http compression on, so I’d probably stick with JS MIN.  For more info on obfuscation see here.
  • YUI Compressor – Another code obfuscator/compressor tool, looks very promising and renders awesome compression.

I also stumbled across this (http://www.julienlecomte.net/blog/2007/08/13/) which overviews a few of the tools well and has a great chart on download and file size statistics using all these said tools and does touch on GZipping files/http compression, more of which I will get into in the next article.

VN:F [1.9.10_1130]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.10_1130]
Rating: 0 (from 0 votes)
Bookmark and Share
kick it on DotNetKicks.com
Shout it

NOW, FOR A WORD FROM OUR SPONSORS

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*

My name is Graham O'Neale and I'm a software architect from Gold Coast, Australia. I am an overtime thinker, full time coder and awake part time in the real world. I have a keen interest in software development, particularly in the realm of programming (C#, ASP.NET, ASP.NET MVC, LINQ (2 SQL), Entity Framework, Silverlight, Blend, WCF, WPF) and a keen interest in the cutting edge and innovation. I have a new found love for design patterns, ALT.NET practices and well crafted software architecture. The purpose of this blog is to express any thoughts, findings, tips and gripes along my travels in the wonderful world of coding and technology...