Reputation: 1616
I have a website that serves gzipped html pages. Because of the structure and repetitiveness of the html, gzip yields huge compression ratios, but the uncompressed html gets very large and, if browsers cache content only after decompressing it, browser caches could fill too quickly (most notably in the case of mobiles).
I would like to know if mobile browsers and desktop browsers tend to cache gzipped pages in compressed or uncompressed format.
Upvotes: 3
Views: 1150
Reputation:
The answer is Yes.
Most of the popular browsers like Chrome, Internet Explorer, Opera, etc. do cache HTML into compressed form.
But, not all responses are compressed. Images make up the largest number of resources but shouldn’t be compressed. On the other hand, HTML documents, scripts, and stylesheets should be compressed and account for 30% of all requests. Being able to save 3x as many of these responses to cache could have a significant impact on cache hit rates.
I hope my answer can help you. If not, sorry for mistaking.
Source: http://www.stevesouders.com/blog/2012/03/27/cache-compressed-or-uncompressed/
EDIT: But if the html was already gzipped. The smallest size after compression was already the smallest. It is meaningless for double compression.
Upvotes: 4