Ramin Hossaini (blog)

13Oct/080

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)
Share and make me happy:
  • Twitter
  • Facebook
  • Digg
  • StumbleUpon

No related posts.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


Please leave these two fields as-is:

No trackbacks yet.

Bear