data so that it takes less storage space or less transmission time than it would if it were not compressed. Compression is possible because most real-world data is very redundant
back to the CLIENT. Data Transfer takes place during these REQUESTS & RESPONSES b/w CLIENT & SERVER. These days many sites takes the advantage of browser caching to minimizes the data transfer and to provide smooth transitions.
for a given response using Content- Encoding RESPONSE HEADER. If the server utilizes compression, it should generally include a Vary : Accept- Encoding RESPONSE HEADER to help ensure that a cache does not mistakenly serve a compressed response to a client that cannot understand it. HTTP requests advertise the decompression algorithms the client supports using the Accept-Encoding REQUEST HEADER.
to compress request bodies using the same Content- Encoding mechanism. In practice however, this feature is not used by browsers and is only rarely used by other types of HTTP clients. One Problem is that a client does not know, whether a server accepts compressed requests in prior. In contrast, a server knows whether a client accepts compressed responses by examining the Accept-Encoding REQUEST HEADER.
in the web and many algorithms are developed based on this. This algorithm is used for HTTP/1.1 Content-Encoding. HTTP SPECIFICATION: Content-Encoding : deflate DEFLATE algorithm combines CLZ77 Algorithm & HUFFMAN Encoding.
implementation It is used where the static resources such as jquery.js & other frameworks are reused often. As these resources are transferred across the web over million times across various devices. It only takes one-time compression costs for a millions-of-times transfer size savings. The beauty of ZOPFLI is that its output is compatible with all of the billions of existing DEFLATE encoders deployed worldwide, making its use an easy choice for any static content.
such as PNG image formats or WOFF font format. Recently Google developed a new compression algorithm BROTLI and open sourced it. It produces about 20 to 26% higher compression ratios over Zopfli. These are already shipped in new Firefox Developer Edition Version 44 & will be shipped in the next higher version release of Google Chrome. Today, Brotli is the compression engine behind the newish WOFF2 font format.