Web archive

Regardless of the fact that thumbnails use the default generator, or the template-driven generator, thumbnails can be written in plain html or compiled in a standard known as web archive.

Think of web archive like a zip package : a lot of files compressed into one. Web archive is "html on steroids". It supports all of the features of html and, additionally, can embed pictures and other resources right into the same file.


The features of a web archive

Since a thumbnail is made of html plus one or more shot pictures, plus other pictures and any other kind of resource types you might think of (videos, flash movies, css stylesheets, javascript source code, ...) it makes sense for users to be able to publish their thumbnails without worrying much about the issues of html, namely the fact that resources referenced in the html source code reside in separate files.

The file uniqueness allows to share thumbnails by just sending one file in attachment of an email, or uploading that file to a web server, and so on.

Ironically, major email clients already support web archives natively, which means that you could technically speaking send one thumbnail as en email, not as an attachment like a zip file. And the recipient would see the thumbnail just like any regular html email.

One more reason to use web archives when possible is that a thumbnail is made of one or more pages. This adds up to the files that have to be moved in sync any time you want to share a thumbnail. Web archives not only embed resources, they also embed all the pages, all properly linked. When you open a web archive with a major email client, or a major web browser, then the links do work. When clicking the navigational Next link in some thumbnail's page, it brings you to the next without loading anything from a server, and without accessing the file system in search for a separate file. In other words, web archive has a lot of compelling features when it comes to sharing rich content like thumbnails. Give it a try.


How to use the web archive in AVS

As simple as choosing a .mhtml file extension for your target file, instead of the default .html file extension.

This is covered in Step 1 of the publish to the web wizard page, but let's recap here how it works. There are two ways to create web archives :

  • The first is by changing the file extension to .mhtml in the wizard. For instance, replace c:\tmp\thumbnail.html by c:\tmp\thumbnail.mhtml.
  • The other is to click on the browse button, drop down the file type, choose web archive (.mhtml), and click Ok.


Technical details

If you are using templates to create thumbnails, you'll see that not only the shot pictures are embedded in the web archive, all other resource files declared in that template file are also embedded right into the web archive.

For instance, css stylesheets, javascript source code and any picture is embedded. More accurately, all local resources are embedded. Resources pointing to websites (prefixed with http:// for instance) are left as is, not embedded.

Resource files are encoded with their mime type, an id that describes their content type. According ot the mime type, some of the content, like the html source code, the css stylesheets are encoded as is, as plain text, while some other resources are encoded with the base64 mechanism, a standard cross-platform protocol aimed to encode binary content.

Regarding links, those pointing to web resources (for instance prefixed with http://) are left as is, while local resources are prefixed with cid: and point to internal resources of the web archive, allowing to navigate through the pages without ever having to load anything else.

Last but not least, since the web archive file format is a standard protocol, nothing prevents you from creating web archives on Windows that will be read by a non-Windows client. It just works, like html.