Question

What does a zipped html file using zlib (deflate) look like sitting on the server? Does it have a different extension than .html?

Was it helpful?

Solution

Depending on your webserver settings, it is also possible to zip the html files in advance, in addition to having the webserver automatically zip them. Usually the extension is .gz, eg MyPage.html becomes MyPage.html.gz. With the right settings, if someone requests http://example.com/MyPage.html, and Apache sees MyPage.html.gz, and the client supports compression, it will instead serve the MyPage.html.gz version. The client will then transparently decompress the content, and the user will not even know or care that it was compressed (except maybe being slightly happier that the page loaded a fraction of a second faster)

OTHER TIPS

It has the extension you uploaded it with.

Note that if you ask the web server to serve deflated html pages, it will do so on-the-fly, and any caching it does will be somewhere other than your web site directory, so you won't actually see those files, if they are files at all.

In other words, if you're serving on-the-fly compressed files, you store the normal files on the server with the normal .htm or .html extensions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top