NCSA Mosaic File Typing Issues

Motivation

Quite independent from their sources, files have types. A given file can be plaintext, HTML, GIF, JPEG, AIFF, MPEG, PostScript, you name it. (MIME provides a way to type data elements within a file, but the file itself still has a type: MIME [or, perhaps more properly, a MIME-compliant RFC822-format message].)

In an ideal world, the type of each file would be well-defined metadata always accessible to an information browsing client prior to the act of accessing the file. This is true on the Macintosh, but not on most other systems, and certainly not on the Unix-dominated Internet. Bummer.

Therefore, in an imperfect world, Mosaic uses the common (but not mandated and not standardized) convention of examining a file's extension to attempt to determine its type. PostScript files are assumed to be suffixed '.ps', GIF files '.gif', etc. In this way, Mosaic can correctly determine file types for the majority of the data files available on the Internet.

When a file type cannot be thus derived, Mosaic makes a guess. Files coming over a HTTP server are assumed to be HTML; files coming from any other source (except Gopher; see below) are assumed to be plaintext.

This, of course, causes a problem. What happens when a file is assumed to be viewable text, but it really isn't? Well, Mosaic attempts to display it as text. Boom. Serious badness.

Solution

Mosaic attempts to provide a solution. You are allowed to explicitly tell Mosaic in no uncertain terms that a file or files you intend to access are to be treated as non-viewable data and are to be dumped to local disk.

When accessed files are automatically dumped to disk as binary data in this manner, Mosaic is said to be in "binary transfer mode".

A toggle button in the Options menu allows you to turn binary transfer mode on and off, on the fly, at the per-window level. It is implicitly assumed that binary transfer mode will generally be off, otherwise very little of Mosaic's normal information-browsing functionality will be available.

However, when you're in a situation, e.g. while browsing an anonymous FTP site, where you know you want to pull over 'file.xyz' and you know that file 'file.xyz' is really binary data and shouldn't be displayed as text, then you turn on binary transfer mode, access the file, grab the file from the local disk (where it is dumped automatically by Mosaic), and switch back out of binary transfer mode.

Note that automatic and transparent uncompression of compressed (.Z) and gzip'd (.z) files still occurs in binary transfer mode.

Notes

Note that it is practically impossible to heuristically determine whether an untyped file is viewable or not viewable as text for the simple reason that 8-bit text is now commonplace.

Gopher has its own typing system (and not a very good one, at that). As such, the rules don't apply. Mosaic tries to do the right thing with various types of Gopher files, but using a different scheme, based on the Gopher-defined file types.