Wednesday 19 April 2017

Serving gzipped html which is a merge of two gzipped files

We have a custom cache system (nodejs) with billions of cached gzipped html for a fast delivery.

In order to get a fast initial render, we had to inline some css at every page. The space the css takes costs my company thousands of dollars every month.

I would like to have the top part of the page (from <html> until the </head>) in one shared gzipped file and the rest of the page separately, and serve them as one gzipped html document.

Note that Chrome is not supporting multi member gzipped file (concatenated gzipped)

I can keep the files uncompressed, merge them and compress them in runtime, but that will hurt performance and the whole idea of a caching layer.

How can I merge gzipped files without creating multi member file or serve html file that is comprised of two parts?



via Tomer Almog

No comments:

Post a Comment