First we explain what happens when you load a HTML-file with a WEB-browser over the Internet?
So probably when you are reading the file, the connection is already closed. This is why you have to reload a file when a change is made to it. Many browsers will even cache the file, i.e. write the document temporarily to a disk. So sometimes, especially when you are working with scripts, you have to clear the cache as well.
The WEB mechanism allows to send other files than just HTML files. By default the browser will allow you to save the file on a local disk in such a case. But it is possible to start an application on your local machine as well. For instance, if the file is a MS Word document, than it may start MS Word right away, or, if it is a dvi-file, it may start a dvi viewer.
The browser knows what to do by looking at the extension of the file. The extension of a file is the subpart of the name after the last dot, like txt in myfile.txt. The protocol for this communication is the same as that of MIME (Multipurpose Internet Mail Extensions) which is used by the Internet mail to append non-ASCII files to email messages. Both the server and the browser must be aware of the application that belongs to an extension.
On Windows and Apple platforms, the operating system allows so-called associations based on the extension, and those are used by the browser. On UNIX platforms, the browser uses two files in your home directory, .mime.types and .mailcap to start an application on the base of an extension. Suppose we have a DVI file called chapter1.dvi.
application/x-dvi dvi
application/x-dvi; xdvi %s
So if you have this set up in the right way, then a little DVI file should show up by activating the link. If not, you are allowed to save the file, and that is all.