What is GZip?
You may have heard of GZip, when people talk about online compression GZip is often what they are talking about. GZip is important for websites around the globe and enables them to deliver their data more efficiently and faster than before. Even though we now have incredibly fast internet connections and high bandwidth, the amount of data sent is still a concern for web service providers and end-users. For the large web service providers who send thousands of large files across the globe daily, this can have a huge impact on the cost and performance of their service. In short, GZip is a way to compress and shrink the size of the files to reduce bandwidth usage and file size.
How Does The GZip Compression Level Affect Resource Usage?
- When a request is sent from the end-user the server looks into the header of the request to see if the browser supports GZip compression.
- If the browser does support GZip, then the server will create a markup for the page before it applies GZip.
- GZip then converts the markup into a compressed data stream which it then sends to the end-user.
- The files are then decompressed by the browser and it creates the web page.
How Does GZip Work?
GZip compression performance depends on the CPU of the user’s computer. GZip can be sent at very high compression levels which will result in a smaller file size, however, due to this compression, it will be more CPU intensive to decompress the file. Most CDN providers will offer various levels of compression.
An Example of GZip Compression
A study in 2009 showed the huge impact that compression can have on some of the top websites. For Facebook, enabling GZip compression allowed them to reduce a page’s load time by an average of 9.4 seconds or 414%. This allowed Facebook to save 350KB which may not seem a lot but when you consider the number of users Facebook has this saving is huge and makes for a large improvement.
The average website has grown by almost 1.2MB over the last 10 years and as our demand for the information has increased, our ways of optimising this data delivery have also improved. Being able to deliver large amounts of data to the end-user is an important way to help keep users on-site and increase conversions. Being able to reduce your site load speed by 100ms can bring increased sales and time on site which makes the use of GZip vital to any website.