Linking to Files on the Client's Local Computer or Intranet

When you first write your web page on your local computer (the one you sit at and type on), you can of course display files on your computer. The question addressed here, is whether you can still access your local files, after you upload your web page to a hosting site.

The answer is -- in some circumstances. I've found that my browser (IE 6 or 7) will not display my local html files from my website. I suspect this is a security issue.

It will however, play midi files and display images.

Here are the requirements for displaying local files from a hosted webpage.

This feature might be most useful if you share an intranet and wish to display files on another computer on the intranet.

The computer displaying the web page is called the local computer. The web address of the local computer is:

file:///
or
file://localhost/

Here is a simple example which, unfortunately, doesn't always work.

Input the name and complete address of a file on your computer:

A JavaScript program will change the back slashes to slashes, and append 'file://localhost/' to the front of the address. This is then used as the href in an anchor tag.

In my hands this does not work with html files. It does work with midi files, but not with m3u files. Using IE 6.

It did however work fine when using local images within a page.

Valid HTML 4.01 Transitional