Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between "file:///" and "file://"

I tried both and both did the same. Is there any difference (only for interest)?

I have a WebView that loads local data and was able to hand over an URL like that.

Example:

webView.loadUrl("file://storage/emulated/0/folder1/folder2/hello.html"
like image 457
codepleb Avatar asked Mar 16 '26 13:03

codepleb


1 Answers

The difference in URL definiton in which the schema separated from the path using schema://. The next you specify the path, if the path is absolute then it begins with /. The correct url on Unix

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

but it could be on Windows

"file://c:/storage/emulated/0/folder1/folder2/hello.html"

Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!