URL Formats
http: URL
ftp: URL
file: URL

File Format Articles
URL File Format
FND File Format
RAW File Formats

Web Articles
URL Schemes





The file: URL Format

 

This article describes the file: URL format, which are URLs with the file scheme.

 

What it is used for

The file scheme is used for accessing files on the local computer or file system mounted network, and had been standardized by the IETF in RFC 1738, now a registered IANA scheme. Some of its uses, is for working with HTML files on the file system, such as documentation on CD-ROM, or accessing a sort of intranet document repository on a shared drive.

General file: URL Format

The file: scheme format is generally of the form:

file://machine/C:/My%20Folder/Example%20SubFolder/myfile.html
---- --------- ---------------------------------------------
 ^    ^         ^
 |    |         \-- The path, with forward slashes, and escaped characters   
 |    |
 |    \------------ Often there is three slashes, with an optional authority, machine ID or hostname
 |
 \----------------- "file:"

The IE "file:" URL Format

Because of Internet Explorer's original tight integration with Explorer, the Internet Explorer address bar will show the file's path instead of the file: scheme.

C:\My Folder\Example SubFolder\myfile.html

However, IE's address bar will accept these two other formats:

file:///C:/My%20Folder/Example%20SubFolder/myfile.html
file:///C|/My%20Folder/Example%20SubFolder/myfile.html

The Firefox Default file: URL Format

Firefox's normal file: format is:

file:///C:/My%20Folder/Example%20SubFolder/myfile.html

The Opera file: URL Format

Opera's normal file: format adds the local host name in between the last two of the first three slashes:

file://localhost/C:/My%20Folder/Example%20SubFolder/myfile.html

Alternate file: URL Formats

Instead of the colon, a vertical bar (|) can be used instead:

file:///C|/My%20Folder/Example%20SubFolder/myfile.html

Links

RFC 1738 contains information on the original URL schemes

Disclaimer: The information presented here is for informational purposes only. Please note that I am not the person, and I’m not involved with the one(s), who made the URL formats.