java - Difference between "file:///" and "file://" -


i tried both , both did same. there difference (only interest)?

i have webview loads local data , able hand on url that.

example:

webview.loadurl("file://storage/emulated/0/folder1/folder2/hello.html" 

going spec file://storage/emulated/0/folder1/folder2/hello.html invalid. storage here should represent host name.

while using file uri scheme may choose ignore host represents path. described on wiki page, quote below.

a file uri takes form of

file://host/path

where host qualified domain name of system on path accessible, , path hierarchical directory path of form directory/directory/.../name. if host omitted, taken "localhost", machine url being interpreted. note when omitting host, slash not omitted ("file:///foo.txt" valid, while "file://foo.txt" not, although interpreters manage handle latter).

my guess webview.loadurl lenient , accepts file uris not conform spec. uri.fromfile() provides example on right format.

example: "file:///tmp/android.txt"


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

python - Django-cities exits with "killed" -

python - How to get a widget position inside it's layout in Kivy? -