The webarchivefile format is available on macOS and Windows for saving and reviewing complete web pages using the Safari web browser. The webarchive format differs from a standalone HTML file because it also saves linked files such as images, CSS, and JavaScript. The webarchive format is a concatenation of source files with filenames saved in the binary plist format using NSKeyedArchiver. Support for webarchive documents was added in Safari 4 Beta on Windows and is included in subsequent versions. Safari in iOS 13 has support for web archive files. Previously there was a third party iOS app called Web Archive Viewer that provided this functionality.
Webarchives are automatically generated for ads submitted to Apple's iAd advertising platform.
The WebKit framework's WebArchive class is used to simplify cutting-and-pasting with whole or partial web pages.
Vulnerability
In February 2013, a vulnerability with the webarchive format was discovered and reported by Joe Vennix, a Metasploit Project developer. The exploit allows an attacker to send a crafted webarchive to a user containing code to access cookies, local files, and other data. Apple's response to the report was that it will not fix the bug, most likely because it requires action on the users' part in opening the file.
Converting for other browsers
Workarounds to allow the file to be viewed in other browsers are possible, though specific webpage contents may hinder this process. This requires one of the free tools WebArchive Folderizer or WebArchive Extractor.
Alternatives
is an open format that enables saving of whole webpages in a single file. It is currently supported by Firefox, using an extension. Other web browsers use the MHTML format or do the equivalent by saving a directory of inline resources alongside the HTML file, sometimes compressed, like the.war format used by Konqueror. Safari does not support these alternative archive formats. For archiving entire websites, the Internet Archive has developed the WebARChive format which was standardized by ISO. HTMLD is a NeXT-developed format for saving web pages and their dependencies in a bundle that may also be served by a web server.