The Web provides a convenient mechanism for distributing files and programs. Files of any type can be placed in a Web-accessible directory, which allows them to be reached from a browser through an HREF link from a Web page (or via direct URL). When a link to a file is followed from a Web page, the file is downloaded to the viewer's browser or computer.
For example, if the file you want users to pick up is is called file.mws and it is in the same directory as your HTML file, your link will read:
<a href="file.mws">Download file.mws</a>
If the file is in a subdirectory of the directory in which your HTML file resides, and that subdirectory is named foo, the link will read:
<a href="foo/file.mws">Download file.mws</a>
If the file is at another site then the link might be:
<a href="http://www.othersite.org/file.mws">Download
file.mws</a>
The configuration of the browser determines how the downloaded file is handled. Generally, text and image files are handled (displayed) automatically by the browser. If the browser is configured for such, other applications (called helpers or plugins) may be named to handle other types of files. If the browser can't identify an application to handle a particular file, it prompts the user to save the file to disk or locate the application.
The identification of file types works as follows:
The Web server passes a "Content-Type" for the file to the browser, which is specified using the Internet standard MIME types. Some common examples are "text/plain", "image/gif", are the most general, "application/octet-stream". An HTML file is "text/html".
In addition to the Content-Type of the file, the browser may look at the filename extension (e.g., .pdf or .ra), to identify the type of data the file contains and open the file in the appropriate application.
Web distribution of files raises a number of Athena-related issues:
Helpful Hints: