HTTP compression is a feature used to compress web pages prior to transmission over the network. The compression and decompression is done at the Web server and browser respectively. RFC 2616’s section on Content Codings provides detail on the supported compression methods with gzip being widely used.
Within the Firefox browser if we type “about:config” in the browser website address field it takes us to gzip, deflate if we search for encoding.
We can modify the value here in the browser configuration and remove gzip. Doing so will make Firefox not send gzip as a supported compression format in it’s HTTP GET request. Web servers which use gzip will then send uncompressed data.
I decided to test website load times variation with compression enabled and disabled. I shuffled the browser configuration above (removing/adding gzip) a couple of times and reloaded the same page while clearing the browser history. Simultaneously I took wireshark traces capturing the HTTP GET requests and OK responses to compare the time and byte count variations and see the changed packets.
The difference was obvious. Initially the HTTP GET request sent by Firefox contains Accept-Encoding value of gzip and deflate both. This is shown below.
This shows that if there is compression carried out between the web server and the browser there is improvement seen on the network in terms of saved bandwidth, load time and therefore user experience.