MIME Encapsulation of Aggregate HTML Documents

from Wikipedia, the free encyclopedia

MIME Encapsulation of Aggregate HTML Documents ( MHTML ) is a standard for storing a complete HTML page in a single archive file.

The abbreviation MHTML roughly means " MIME integration of composite HTML documents". The standard is listed as RFC 2557 by the IETF .

MHTML is intended to solve the problem that when the user saves an HTML page - in addition to the actual HTML file - graphics and other elements displayed on it have to be saved separately, which ultimately also requires changes to the actual HTML file.

In MHTML, web pages including their graphics and other embedded elements are brought into a compact form that is stored as a single file in a MIME-compatible format. Certain content, e.g. B. Scripts that do not come from the same domain as the website are not saved. MHTML files are often saved with the .mht extension .

The format is as a MIME - email set up. MHTML is used, for example, in HTML e-mails to embed images in the e-mail.

The format is currently (2018) supported by the browsers Internet Explorer , Edge , Google Chrome , Vivaldi and Opera . The feature has now also been implemented in the WebKit engine. For the Mozilla Firefox one is add-on required for. B. Mozilla Archive Format, with MHT and Faithful Save and unMHT ; however, since Firefox Quantum (version 57) the MHT format is no longer supported, add-ons such as unMHT are no longer compatible. On some smartphones , websites are saved in this format by the built-in browser.

MHTML is a suitable means of archiving individual web pages in a form that is as true to the original as possible. In contrast, the content of entire websites cannot be efficiently archived in this way; for such occasions z. B. wget at.

Another way to embed elements in an HTML file is with the Data-URL method .

Web links