Total Pageviews

Thursday, 27 December 2012

使用FF把网页保存为mht格式

Recently somebody asked me how to save web pages in MHT Format using Firefox. For those who don’t know MHT is a compressed format to save webpages into a single file and all images/css/text related to webpage is embedded into a single page(.mht). Firefox does not have support for MHT format maybe because MHT is a Microsoft created format.
But that does not mean Firefox users can’t use it. There was a extension for Firefox earlier known as Mozilla Archive Format. It was working good until Firefox 1.5. But then developer stopped working on it and it does not work on Firefox 2.0. :(
No Way! There has to be a way out. Why would otherwise I waste a long post telling you about it? Well there is a way out. :grin: We will forcibly make it compatible with Firefox 2.0. :twisted: Here are the easy steps:
  1. Download the extension from here. Download but don’t install. To override Firefox default installer either paste the link in your download manager or open this link in any browser other than Firefox. Since it won’t install on FF saying compatibility problems.
  2. Rename the downloaded file maf-0.6.3.xpi to maf-0.6.3.zip
  3. Open the zip file using Winzip or any zip utility.
  4. Extract install.rdf file
  5. Open install.rdf file and find this code:
  6. <!– Firefox –>
    <em:targetApplication>
    <Description>
    <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
    <em:minVersion>1.5</em:minVersion>
    <em:maxVersion>1.5</em:maxVersion>
    </Description>
    </em:targetApplication>
  7. In this change
    <em:maxVersion>1.5</em:maxVersion>
    to
    <em:maxVersion>3.0</em:maxVersion>
  8. Save install.rdf and put the new install.rdf back in maf-0.6.3.zip replacing the old one.
  9. Rename maf-0.6.3.zip to maf-0.6.3.xpi
  10. And now open the xpi file with firefox if xpi is not set to open with Firefox. Install the extension and it will work for you.
That’s all. It will work now with your latest Firefox 2.0.0.7 Not Tested on 3.0 alpha release. If anyone can test with 3.0 alpha and post here, I will update the status here.
UPDATE: I should have updated this post long before. Firefox has now a extension to save pages as MHT – UnMHT. Get it from http://www.unmht.org/
下载地址:  http://www.unmht.org/unmht/files/unmht-6.1.2.xpi 
(http://www.unmht.org/unmht/en_index.html)

FROM http://nspeaks.com/save-web-pages-in-mht-using-firefox/