| Filename extension | .mht |
|---|---|
| Type of format | Markup language |
| Extended from | HTML |
| Standard(s) | RFC 2557 (proposed 1999) |
MHTML, short for MIME HTML, is a web page archive format used to bind 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 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.
Contents |
Web browser support
Few browsers support this format, and the process for saving a web page along with its resources as an MHTML file is not standardized across those browsers that do. 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.
There seems to be a number of issues around publishing such files via HTTP to Internet Explorer. Although a static file saved from a compliant browser will render correctly within Internet Explorer provided it is served up via a URL ending in .mht, the mimetype , content-disposition and caching instruction headers are essentially ignored, e.g.
<?php
// header("Content-Type: multipart/related");
// - causes MSIE to download of the file which s treated as text
// header("Content-Type: text/html");
// - renders incorrectly - not split into seeprate files
header("Content-Type: message/rfc822"); // from W3Schools list of mime types
// - as per text/html
print file_get_contents('data/something.mht');
?>
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 "Save as" function is MHTML.
Firefox
Mozilla Firefox needs UnMHT or Mozilla Archive Format extensions to open and write MHT files. These add-ons work with Firefox 1.0 and later.
Since version 5.0.0, UnMHT offers partial support for MHT files exported from Microsoft Office applications. Mozilla Archive Format, as well as opening and saving .mht files, also can save to its own "MAFF" format. The MHT files it generates are not fully compatible with Microsoft's products.[3]
Currently Firefox doesn't include support for saving or opening web pages as MHTML files without either of these add-ons, as of version 3.5.2. There is, however, source code available for viewing MHTML files within the related Thunderbird project, so in the future it may become available without such add-ons. This is filed as an unsolved issue within the Firefox project since 1999 (see bug 18764) though progress in fixing it seems to have stalled.
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.
Safari, instead, as a replacement to MHTML, 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[4] based on SIMBL application enhancement loader[5] and GreaseKit.[6]
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 April 2009, Google Chrome does not support viewing or saving MHTML files.
Editing support
All versions of Microsoft Word since Word 2002 can open and save MHTML documents.[7][8] A converter is available from Microsoft to enable Word 2000 to open,[9] and an add-on to allow it to save,[10] MHTML files.
MHTML is also supported by Microsoft Office Viewers[11][12], Microsoft Word, Microsoft Publisher, Microsoft Excel, and Microsoft PowerPoint.[13] Microsoft's HTML editors, FrontPage, Expression Web and SharePoint Designer do not support editing MHT.
A Windows application called Blocknote supports editing MHTs.[14]
On the Linux platform a utility called kmhtConvert is available to convert MHTML files to the KDE Web Archive format.[15]
See also
- An alternative for attaching resources to an HTML document is the Data: URI scheme defined in IETF standard RFC 2397.
References
- ^ "Neue Features in Internet Explorer 5". Microsoft. 23. Oktober 2007. http://support.microsoft.com/kb/221787. Retrieved 2009-05-10.
- ^ Santambrogio, Claudio (10. March 2006). "…and one more weekly!". Opera Software. http://my.opera.com/desktopteam/blog/show.dml/172375. Retrieved 2009-05-15.
- ^ gardenerstouch (August 12th, 2006). "Feature Request: Support MS Web Archive Files". MozillaZine. http://forums.mozillazine.org/viewtopic.php?p=2554347&sid=7311c84eb2fe5bbbdcdbf9d5e35c39a0. Retrieved 2009-05-10.
- ^ "UnMHT for Opera/Safari". UnMHT. 2008-06-05. http://www.unmht.org/os_unmht/en_index.html. Retrieved 2009-05-10.
- ^ "SIMBL". 2007-10-17. http://culater.net/software/SIMBL/SIMBL.php. Retrieved 2009-05-10.
- ^ "greasekit". google. http://code.google.com/p/greasekit. Retrieved 2009-05-10.
- ^ "Convert legal documents to different word processing formats". Microsoft. http://office.microsoft.com/en-us/word/HA010744571033.aspx. Retrieved 2009-05-15.
- ^ "Saving a document in a file format that cannot support specific features". Microsoft. http://office.microsoft.com/en-us/word/HP010500241033.aspx?pid=CH060829791033. Retrieved 2009-05-15.
- ^ "WD2000: Microsoft Word-Webarchivkonverter for Word 2000". Microsoft. 5. August 2004. http://support.microsoft.com/kb/251336. Retrieved 2009-05-15.
- ^ "WD2000: Microsoft Office 2000 Web Archive Add-on Available". Microsoft. August 5, 2004. http://support.microsoft.com/kb/252472/EN-US/. Retrieved 2009-05-15.
- ^ "Download Details: Word Viewer 2003; Overview Section". Microsoft. 8/9/2005. http://www.microsoft.com/downloads/details.aspx?FamilyID=95e24c87-8732-48d5-8689-ab826e7b8fdf&DisplayLang=en#Overview. Retrieved 2009-05-15.
- ^ "Download Details: Word Viewer; Overview Section". Microsoft. 2007-09-26. http://www.microsoft.com/downloads/details.aspx?FamilyID=3657ce88-7cfa-457a-9aec-f4f827f20cac&displaylang=en. Retrieved 2009-05-15.
- ^ "About single file Web pages (MHTML)". Microsoft. http://office.microsoft.com/en-us/word/HP030776471033.aspx. Retrieved 2009-05-15.
- ^ "BlockNote.Net Features". BlockNote. http://blocknote.net/features.shtml. Retrieved 2009-05-15.
- ^ Spiros, Georgaras (Aug 7 2007). "kmhtConvert". KDE-apps. http://www.kde-apps.org/content/show.php?content=14315. Retrieved 2009-05-15.
External links
- MHTML standard explained
- 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)
|
|||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)




