Gzip for code speed.

Reading Time: 2 minutes

Gzip is a software application used for file compression and decompression. Gzip is short for GNU zip; as the program was created as a free software replacement for the compression program used in early Unix systems.

Thou shalt Gzip. Amen.
Thou shalt Gzip. Amen.

Gzip replaces patent-encumbered data compression algorithms.
Most browsers and server platforms (including Apache and Microsoft IIS) support Gzip. It is often used in web applications and software such as PHP to improve speed. Hypertext PreProcessor (PHP) is a server-side HTML embedded scripting language. PHP is not always provided by a hosting server or may be a “paid” option. PHP is something that need to be “switched on” on the server. Check your ISP for how to do this. Or assume it’s on and just test. You can test to see whether PHP is activated with YSLOW or PageSpeed tools. Gzip can compress the HTML code by 50 percent to 70 percent. It does not compress images. Use SmushIt for image optimization or an image processing program like GIMP or Photoshop – or online at pixlr express.

Gzip compression: What’s the speed gain?
Gzip reduces redundancy in the HTML code. All modern servers and browsers can compress and decompress Gzip on-the-fly. It’s not the same as removing “white space.” White space removal eliminates spaces between words and code. That would buy a 10% reduction in the HTML and is meaningful on dialup. White space removal is now called “minification” or “minifying.” Removing white space AND using Gzip simultaneously are almost an insignificant compression gain—about 1%. Not worth the time usually since all “blanks” are redundant and compressed by Gzip anyway. The difference in speed is usually indistinguishable.

There are a number of plugins that claim to invoke Gzip. Many actually break your site (white screen of death from plugin conflicts) or make your site slower. The goal usually is a simple code modification in a file located in your site’s root folder. This is called the “.htaccess” file. You can alter this code with a simple copy-and-paste in a text editor. But even easier than that is using the “Far Future Expiry Header” plugin. We’ve found that is the simplest – and weightless. When we say “weightless,” we mean the plugin doesn’t add any weight to your pages and thus has no “drag” slowing things down. With the plugin, there’s no messing around in C-panels or FTP clients. The plugin is built for caching your site assets for up to 365 days into the future. We recommend doing that. At the bottom of the plugin control panel page is a little radio button that when clicked enables Gzip for your entire site. Easy! And it works.

What others think of us:


"Hi Steve, Thank you so much for that insightful review! I appreciate the time you took to explain the issue of the website I'm working on. I'll be looking into some of the recommendations you have and advice that you have given." skiveworks.com, Singapore

by - Jaaze Lim