Generating MIME Headers

The HTML generated by the component can be preceded with some optional MIME headers, which control how the resulting HTML is interpreted by the FrontPage Server Extensions. Each header is terminated by a single newline character (“\n”). Indicate the end of all headers with a blank line, so there are two newline characters (“\n\n”) in a row.

All headers are optional. Normally any HTML generated by the component is inserted in-line into the page at the point where it occurs.

You can change this behavior with one of the following types of headers:

Header Interpretation
Content-type: MIME-type Causes the current SmartHTML page to be replaced with the entire result page following this header.
Location: some-URL Causes the current page to be replaced with the referenced page. The SmartHTML program starts interpreting the some-URL page if it is in this web, or else causes the browser to fetch some-URL. This only works for a dynamically-accessed page (Parse=Dynamic).
Redirect: some-URL Works just like the Location header, but if some-URL is absolute (as in http://myweb/mypage.htm), it causes the browser to fetch it directly instead of going through the SmartHTML program.
Links: url-list A space-separated list of URLs to which this component generates links. If any of the pages in the Links list contain spaces, they must be URL-encoded. For example, “my page.htm” should be output as “my%20page.htm”. This information is used by the FrontPage Link View and the FrontPage Table of Contents component.
WriteLinks: url-list If you set any write links, the FrontPage Server Extensions will set the permissions for this file so that Web browsers can write to the file. This allows the component to update the file when used dynamically (for example, a FrontPage Form Results component). Also, files specified in the WriteLinks: mime header for a component are now treated as ancillary files. Such files will be deleted if the page containing the component is deleted, moved if the page containing the component is moved, and so on.
Error: Error-string Components can already specify mime headers to communicate certain information. Now they can specify a new mime header, “Error:”, which causes FrontPage to mark the component page as containing an error. In the FrontPage Hyperlinks view, this results in a red-triangle image that appears in front of the page name. Right-clicking for properties on this page displays a dialog that displays the error string as specified by the component.

It is important to understand the difference between the static and dynamic versions of a page in a FrontPage web in order to use the redirection options available with the Location and Redirect headers. The static version is exactly as the page appears on disk; the dynamic version has its FrontPage components expanded when the page is fetched and a newly-generated page is returned to the browser. The static version of a page is fetched with a normal absolute or relative URL, such as “http://myweb/mypage.htm” or “mypage.htm”. The dynamic version of a page is fetched through the SmartHTML interpreter with a special dynamic URL prefix, such as “_vti_bin/shtml.dll/mypage.htm”.

The dynamic URL prefix comes in two flavors, depending on the web server. The prefix is either “_vti_bin/shtml.dll/” or “_vti_bin/shtml.exe/”.

There are three page redirection options available to a FrontPage component: