MHTML
MHTML stands for MIME HTML (Multipurpose Internet Mail Extension HTML). It is a proposed standard (in 1999 and not yet approved) for including resources that in usual HTTP pages are linked externally, such as images and sound files, in the same file as the HTML code, based on RFC 2557. The included data files are encoded using MIME. This format is sometimes referred to as MHT, after the suffix .mht given to such files by default when created by Microsoft Word, Internet Explorer or Opera.
The key to MHTML is that the content is encoded as if it were an HTML email message, using the MIME type multipart/related
. The first part is the HTML file, encoded normally. Subsequent parts are additional resources, identified by their original URLs.
Contents |
Web browser support
The process for saving a web page along with its resources as an MHTML file is not entirely standardized across browsers that support it. Due to this, the same web page saved as an MHTML file using different browsers may render somewhat differently on each browser.
Internet Explorer
The .mht format was introduced in 1999 with Internet Explorer 5[1], which allows users to save a web page and its resources as a single MHTML file; a "Web Archive". This feature, however, may be unable to save certain complex web pages correctly, especially those containing scripts. All images etc will be saved as a single entity.
Opera
Support for saving a web page including its resources as an MHTML file was made available in the Opera 9.0 web browser since the weekly build 8265 (released on March 10, 2006). Script problems arise here also.
Firefox
The web browser Mozilla Firefox, as of version 2, does not include direct support for saving or opening web pages as MHTML files. Though there is already source code available for viewing MHTML files within the Thunderbird project, this is filed as unsolved bug 18764 within the Firefox project since 1999. This functionality can be obtained on Windows and Linux operating systems by installing a freely available third-party XPI file from Mozilla Archive Format extension, though the .mht files it generates are not fully compatible with Microsoft's products.[2]
As of August 2006, the available version of the MAF extension (V.0.6.3) cannot be installed into versions of Firefox greater than 1.5.
The XPI file containing MAF extension V.0.6.3 for FF 2.0 is available at http://www.mediafire.com/?fgn3zx4ktzd.
Safari
As of version 2.0 (released April 29, 2005), Apple Computer's Safari web browser neither reads nor writes MHTML files. It does include a feature for saving web pages as archives which are seen as single files in Mac OS X's Finder, but they are actually directories containing the HTML page and its linked files.
Konqueror
As of version 3.5.7 (released 2007-05-02), KDE's Konqueror web browser does not support MHTML files. However, it does include a feature for saving web pages as single files ("web archives", file extension .war) which are actually gzipped tars.
Editing support
Microsoft's own HTML editor, FrontPage and their word processor, Microsoft Word cannot read MHTML files created by Internet Explorer correctly with formatting.[citation needed] A converter found on the Microsoft web site provides compatibility for Word 2000. Moreover, Microsoft Office programs save the linked content (such as images) using relative links, whereas Internet Explorer saves the MHTML file using absolute links.
As of 2006, Mozilla Thunderbird, the Microsoft Office 2000 Web Archive add-on for Office 2000 and later versions and Microsoft SharePoint Designer 2007 appear to correctly read and edit MHTML files with formatting intact.
See also
- An alternative for attaching resources to an HTML document is the Data: URI scheme defined in IETF standard RFC 2397.
References
External links
- kmhtConvert (utility to convert mht files to war (KDE Web Archive) files)
- MHTML standard explained
- Firefox extension that supports MHTML archiving and viewing
- RFC 2557 (1999) — MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)
- RFC 2110 (1997, Obsolete) — MIME E-mail Encapsulation of Aggregate Documents, such as HTML (MHTML)