Private

Ramin Hossaini (blog)

13Oct/08

Packer – Javascript compressor

I tried 'packing' an already minimized version of JQuery (which was about 55KB) and this compressed it to about 30KB (almost 50% less). My advice - don't publish any javascript without pumping it through this first!


http://dean.edwards.name/packer/

Some tips:

  • Packer obfuscates code, so it makes things very difficult to debug. If you end up having problems with compressing the code, try compressing sections at a time to find out what's causing the problem.
  • Write code so that it doesn't rely on whitespace or line-breaks. Use braces instead.
  • Don't forget your semi-colons. (Especially when declaring anonymous functions for example)

Related posts:

  1. Learning CSS – The Basics
  2. Extracting attachments from .EML files
  3. Quote from ‘Kafka on the Shore’ – Murakami
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.

Private
Bear