WordPress is known to be resource intensive and memory intensive blogging platform. Without optimizing, if you use WordPress “as-is” you are bound to face the wrath of your host, eventually resulting in the website downtime.

In case you have a heavy theme with lots of images, JavaScripts, CSS etc, you would be needed to worry about “Bandwidth” as well. Everytime you type www.techpp.com into your browser to read this blog, the browser sends a request to the server located at www.techpp.com to get the content. The server reads the request, processes it and sends back the requested data back to the browser.


For example, if you request a web page that is 25,024 bytes long, the web server sends the entire 25,024 bytes to the browser. In other words, the data is sent in its “raw” or “natural” form.

Data Encoding / Data Compression

Almost all the web-browsers these days are capable of sending a parameter Accept-Encoding as a part of the header request. This tells the web server that the browser can accept encoded/compressed data as well. If the server so chooses, it selects one of the encodings that the browser supports (the browser sends a list of supported encodings) and compresses the data with the selected encoding algorithm. Instead of sending a 25,024 byte document in the example above, it might end up sending a 10,567 byte long document which is a significantly lesser data transfer.

GZIP Encoding

“GZIP” or “gzip” refers to compression/decompression algorithm used by the gzip application (gzip application is used to compress and decompress data on UNIX/Linux machines).

A web browser that understands gzip encoding sends an Accept-Encoding header that looks like this:

Accept-Encoding: gzip

The web server encodes the data using the gzip algorithm and sends back the appropriate Content-Encoding header:

Content-Encoding: gzip

The browser then uses the gzip decoding algorithm to return the data to its normal, uncompressed form.

How GZIP encoding saves bandwidth and improves performance?

The idea behind gzip encoding is to reduce the amount of data being transferred over the network. In the example above, the size of the data was reduced by over half. Not only does the data transmit more quickly, bandwidth consumed will be less as well.

Gzip compression and WordPress

I hardly have much knowledge on WordPress core files. From whatever I know, in WordPress 2.8 beta, hooks for gzip encoding have been provided for the plugin/theme designers. But I believe GZip encoding and compression should be enabled by default within WordPress core (which I believe is not the case right now).

Plugins like wp-super-cache provide this feature to gzip the content, which in turn compresses the data (js and CSS) and ensure better performance and lower bandwidth usage. But why a plugin must be doing this? Why not it be a feature in WordPress?

I request people who know about WordPress to comment on this and correct me if I am wrong anywhere.

Also Read:

Raju is the founder-editor of Technology Personalized. A proud geek and an Internet freak, who is also a social networking enthusiast. You can follow him on Facebook and on Twitter. Mail Raju PP. Follow rajupp