Updated: May 30, 2009
Contrary to popular belief, .mht files are not a Microsoft conspiracy. They are a legitimate standard, allowing you to save webpages as a single file rather than as an .html file and a whole directory of images, scripts, and other accompanying files.
There's one problem - it seems that Firefox can't handle these files well. If you try to open them on Linux, even if Firefox is your default web browser, the files will be opened using a text editor or an alternative browser (like Opera), capable of correctly handling the .mht files. Luckily, the solution to this small, if annoying problems is extremely simple. Let me show you how you can enjoy .mht files on Linux, without abandoning Firefox.
To create the problem, I opened my own site in Opera and chose to save the file. By default, Opera suggested the .mht format.
After I saved the file, it shows in the file manager as a text file.
Double-clicking on the file will open it in Opera, which is not the default browser. So I tried the right-click:
Firefox will start, but it will not display the file. Instead, it will prompt you with a download window:
So you will try to "fool" Firefox. Under Open with, you will choose Firefox itself and then check the box Do this automatically for files like this from now on:
What this will do is the following: Firefox will start spawning tabs, in each one trying to perform the same action as above, fail, then open another tab, and continue like this until the system runs out of memory.
So, this is not the right way of doing it.
It is true when they say that you can find a Firefox extension for just about any conceivable thing in this world. Opening .mht files is no exception.
What we need is a Firefox extension called unMHT:
Install the Addon and restart Firefox. If you don't know how to do this, then please take a look at my tutorial explaining how to manage Firefox addons.
Now, let's go back to our test file:
And here we go:
Notice the unmht:/// prefix in the address bar. Job done!
If you want to tweak the Addon, you can play with its options:
Opening .mht files in Firefox (on Linux) can be done, very simply and easily. You won't have to hack the system or the configuration files. Installing a Firefox Addon will do the magic.
As a rule, whenever you have an issue with web-related content, make sure to check the Firefox Addons repository. You will be amazed how much great stuff can be found there. And usually, someone has already encountered your problem and made a fix for it.