Jump to content

MHTML

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 1230049-0012394-C (talk | contribs) at 10:48, 13 October 2010 (remove example reference). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

MHTML (MIME HTML)
Filename extension
.mht, .mhtml
Internet media typemessage/rfc822
Type of formatMarkup language
Extended fromHTML
StandardRFC 2557 (proposed 1999)

MHTML, short for MIME HTML, is a web page archive format used to combine resources that are typically represented by external links (such as images, Flash animations, Java applets, audio files) together with HTML code into a single file. The content of an MHTML file is encoded as if it were an HTML e-mail message, using the MIME type multipart/related. The first part of the file is normally encoded HTML; subsequent parts are additional resources identified by their original URLs and encoded in base64. 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. MHTML is a proposed standard, circulated in a revised edition in 1999 as RFC 2557.

Web browser support

Many browsers support the MHTML format, either directly or through third-party extensions, but the process for saving a web page along with its resources as an MHTML file is not standardized. Due to this, a web page saved as an MHTML file using one browser may render differently on another.

Internet Explorer

The .mht format was introduced in 1999 with Internet Explorer 5.[1] Saving in this format allows users to save a web page and its resources as a single MHTML file called a "Web Archive", where all images and linked files will be saved as a single entity. It may, however, be unable to save certain complex web pages correctly, especially those containing scripts. In Internet Explorer 8, the default saving format for the "Save as" function is MHTML.

Opera

Support for saving a web page with its resources as an MHTML file was made available in the Opera 9.0 web browser.[2] In Opera 9.50, the default saving format for the "Save as" function is MHTML.

Firefox

Mozilla Firefox requires an extension be installed to read and write MHT files. Mozilla Archive Format ([1]) and UnMHT ([2]) are examples. Both are compatible with Firefox 1.0 and later. Both will open and save web pages as .mht files, but both have compatibility issues with opening these files in Internet Explorer.[3]

Mozilla Archive Format, in addition to .mht files, can save .maff files, based on ZIP compression. As ZIP technology is widely compatible with the Windows operating system and other software such as WinRAR, a web page saved as .maff can be easily extracted to produce a standard .htm file with a sub-folder containing accompanying files, as well as an .rdf file. This format produced is compatible with all browsers. MHT files cannot be extracted in this way.

UnMHT (version 5.0.0 or greater) offers partial support for MHT files exported from Microsoft Office applications.

Although Firefox does not currently (v3.6.3) include support for MHTML without the use of add-ons, there is source code available for viewing MHTML files within the related Thunderbird project, indicating that future support in Mozilla software such as Firefox may become available without such add-ons. MHTML support has been filed as an unsolved issue within the Firefox project since 1999[4], while progress in fixing it seems to be slow moving.

Safari

As of version 3.1.1 (released 2008-05-28) onwards, Apple Inc.'s Safari web browser does not support the MHTML format at all.

Instead, as a replacement to MHTML, Safari saves web pages in a new webarchive format (filename extension: .webarchive). These were originally directory bundles pre-Safari 3.0, but are now single file property list files.

For the more technically minded, there is an UnMHT port for Safari available[5] based on SIMBL application enhancement loader[6] and GreaseKit.[7]

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) that are actually gzipped tarballs. (There is a side project mhtconv that allows to use MHTML with Konqueror for both 3.x and 4.x KDE branches)

ACCESS NetFront

NetFront 3.4 (on devices such as the Sony Ericsson K850) can view and save MHTML files.

Google Chrome

As of March 2010, Google Chrome does not support viewing or saving MHTML files. However, SingleFile is an extension which can allow the user to archive a complete page into a single file like WebArchive, MHTML, or MAFF do.

Editing support

All versions of Microsoft Word since Word 2002 can open and save MHTML documents.[8][9] A converter is available from Microsoft to enable Word 2000 to open MHTML files,[10] and an add-on is available to allow it to save MHTML files.[11]

MHTML is also supported by Microsoft Office Viewers[12][13] in Microsoft Word, Microsoft Publisher, Microsoft Excel, and Microsoft PowerPoint.[14] Microsoft's HTML editors, such as FrontPage, Expression Web, and SharePoint Designer, do not support editing MHTs.

A Windows application called Blocknote supports editing MHTs.[15]

On the Linux platform, a utility called kmhtConvert is available to convert MHTML files to the KDE Web Archive format.[16]

See also

  • An alternative for attaching resources to an HTML document is the Data: URI scheme defined in IETF standard RFC 2397.

References

  1. ^ "New Features in Internet Explorer 5". Microsoft. 23 October 2007. Retrieved 2009-05-10.
  2. ^ Santambrogio, Claudio (10. March 2006). "…and one more weekly!". Opera Software. Retrieved 2009-05-15. {{cite web}}: Check date values in: |date= (help)
  3. ^ gardenerstouch (August 12th, 2006). "Feature Request: Support MS Web Archive Files". MozillaZine. Retrieved 2009-05-10. {{cite web}}: Check date values in: |date= (help)
  4. ^ Mozilla Firefox bug 18764
  5. ^ "UnMHT for Opera/Safari". UnMHT. 2008-06-05. Retrieved 2009-05-10.
  6. ^ "SIMBL". 2007-10-17. Retrieved 2009-05-10.
  7. ^ "greasekit". google. Retrieved 2009-05-10.
  8. ^ "Convert legal documents to different word processing formats". Microsoft. Retrieved 2009-05-15.
  9. ^ "Saving a document in a file format that cannot support specific features". Microsoft. Retrieved 2009-05-15.
  10. ^ "WD2000: Microsoft Word-Webarchivkonverter for Word 2000". Microsoft. 5. August 2004. Retrieved 2009-05-15. {{cite web}}: Check date values in: |date= (help)
  11. ^ "WD2000: Microsoft Office 2000 Web Archive Add-on Available". Microsoft. August 5, 2004. Retrieved 2009-05-15.
  12. ^ "Download Details: Word Viewer 2003; Overview Section". Microsoft. 8/9/2005. Retrieved 2009-05-15. {{cite web}}: Check date values in: |date= (help) [dead link]
  13. ^ "Download Details: Word Viewer; Overview Section". Microsoft. 2007-09-26. Retrieved 2009-05-15.
  14. ^ "About single file Web pages (MHTML)". Microsoft. Retrieved 2009-05-15.
  15. ^ "BlockNote.Net Features". BlockNote. Retrieved 2009-05-15.
  16. ^ Spiros, Georgaras (Aug 7 2007). "kmhtConvert". KDE-apps. Retrieved 2009-05-15. {{cite web}}: Check date values in: |date= (help)