Using HTML Compressor with Aggressive Settings

The other night I decided to look into HTML compression for Sencha.com. The first Google result led me to HTML Compressor.

Our homepage weighs about 30KB. When using the most aggressive settings, I only saved 5KB. Once gzipped, this reduction in file size only nets a savings of 500 bytes.

In my test case, the savings was not significant enough to worry about. But if you have a very large page, and are particularly worried about mobile where every byte matters, the HTML Compressor might be for you.

File Sizes before and after using HTML Compressor
Original 30,056 bytes (33 KB on disk)
Compressed (Aggressive) 25,025 bytes (29 KB on disk)
Gzipped Original 7,337 bytes ( 8 KB on disk)
Gzipped Compressed 6,801 bytes ( 8 KB on disk)

You can actually try gzipping on Mac OS X, using Terminal to modify your files, and confirm the difference in the Finder:

  1. Place your file on the Desktop, then make a quick copy, as gzip will overwrite the file.
  2. Switch to Terminal and type cd ~/Desktop then gzip myfile.html.
  3. Your original file is gzipped, and has a .gz extension. Use the Inspector, ⌘⌥I, to review the file size of your gzipped file and the copied original.

Posted

in

by

Tags: