Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How to display *.html.gz files in browser for local files

  • 4 replies
  • 1 has this problem
  • 7 views
  • Last reply by dazdude

more options

I need to find a way to allow Firefox to display gzipped local files named like *.html.gz in the browser, for a new application I am working on.

Netscape 4.79 can do this, but it's very out-of-date and lacks modern Javascript and CSS support.

The behaviour of Firefox on local files named *.html.gz is to download them. Why? The files are already saved on the local disk...

Is there a configuration setting I can change to make Firefox display these files?

Ideally, ANY local file with a double extension of *1.*2.gz should be decompressed in the browser. Where *1 would be a name and *2 would be a file type that the browser can normally display (like HTML) or load (like Javascript/CSS,etc.).

If a user really does want to download a local file of this type, there could be a right click option like "Save Link As Uncompressed" or an option in Firefox config to switch this behaviour off.

Needing to run a webserver on the PC just so the browser can display compressed html is a bit ridiculous...

I need to find a way to allow Firefox to display gzipped local files named like *.html.gz in the browser, for a new application I am working on. Netscape 4.79 can do this, but it's very out-of-date and lacks modern Javascript and CSS support. The behaviour of Firefox on local files named *.html.gz is to download them. Why? The files are already saved on the local disk... Is there a configuration setting I can change to make Firefox display these files? Ideally, ANY local file with a double extension of *1.*2.gz should be decompressed in the browser. Where *1 would be a name and *2 would be a file type that the browser can normally display (like HTML) or load (like Javascript/CSS,etc.). If a user really does want to download a local file of this type, there could be a right click option like "Save Link As Uncompressed" or an option in Firefox config to switch this behaviour off. Needing to run a webserver on the PC just so the browser can display compressed html is a bit ridiculous...

All Replies (4)

more options

Why do you have gzipped HTML files?

If a web server transmits a page with a response header indicating that the body of the response is gzipped, then Firefox does know how to decompress it. However, I don't know whether you can fake that with a local file.

Can any of your other browsers open those files?

more options

I am compressing the files with gzip before they are to be transmitted via radio broadcast. Compressing the files reduces the size to less than half, and improves performance by allowing a slower and more robust modulation method and better error correction.

Only Netscape 4.79 can open these files directly.

Yes, I am currently running a simple web server to serve the folder contents to localhost, with the correct headers.

But the browser *could* decode the *.html.gz files if it was possible to configure it to, and it would be far simpler and less trouble for other people to use.

more options

Here are some places to submit feature suggestions, depending on your desired style of interaction:

Discussion Sites/Advocacy

Bug Tracking System

more options

Thanks for your helpful suggestions. I will follow those up.

I do still wonder if there is some hidden way to get the browser to read the *.html.gz local files though....

In the past, this current behaviour of not decoding local files has been regarded as a bug by others: https://bugzilla.mozilla.org/show_bug.cgi?id=52282