Protocollo File URL (Uniform Resource Locator) è lo schema di browser standard registrato presso IANA (Internet assegnazione numeri Authority) per l'accesso ai file su un computer locale.
Protocolli registrati
Il protocollo è costituito da una stringa nota come l'URI (Uniform Resource Identifier) che identifica la posizione di una risorsa locale. RFC (Request for Comments) da IEFT (Internet Engineering Task Force) forniscono le specifiche.
RFC 1630 e 1738
L'URL deve iniziare con "file://" seguita mediante il nome host del computer locale, "localhost" o vuoto. Per il file "/ home/usr/index.html" in un computer denominato "myhost", i seguenti sono accettabili:
file://myhost/Home/usr/Hello.html
file://localhost/home/usr/Hello.html
file://Home/usr/Hello.html
RFC 3986
Se viene fornito un percorso assoluto, il nome host può essere omesso. Ad esempio, file:/home/usr/hello.html.
URL del file di Windows
Un server web Windows consente ai browser di accedere alle cartelle locali sotto la cartella di pubblicazione utilizzando URL internet standard. Se la cartella di pubblicazione è "C:\inetpub\wwwroot\myhost\htdocs\", quindi l'URL "file://localhost/home/usr/hello.html" sarebbe puntare a "C:\inetpub\wwwroot\myhost\htdocs\home\usr\hello.html".
Shlwapi. dll (libreria di Shell Lightweight API) consente ai browser di accedere ai file senza un server web. In un computer con l'UNC (Universal/Uniform Naming Convention) o il nome di "rete/intranet" "NYAFLR02RM038", il browser accetta i seguenti formati:
Non-URL:
C:\Documents and Settings\anotherhello.html
\NYAFLR02RM038\Documents e Settings\anotherhello.html
URL:
file://NYAFLR02RM038/Documents%20and%20Settings/anotherhello.html
file://C:/Documents%20and%20Settings/anotherhello.html