Reputation: 81
I was asked this question in one of my assignments. I was wondering what the difference is in the URLs of the attached image. I know it has something to do with the "file://" and "http://" but I'm not sure how to explain or phrase it.
Upvotes: 7
Views: 8280
Reputation: 1008
First of all you need to understand about the file
and http
. Both are protocols and serves two different purpose.
for your reference:
Upvotes: 3
Reputation: 3153
A file requested via file://
gets opened from local drive. A file requested via http://
gets via HTTP request to URL that comes after it. The second might come from your own computer (example http://localhost ...
) or from anywhere on the web. Although the image might be the same as in your example, it is served via two different protocols.
Upvotes: 1
Reputation: 201
file://
is a request for a local file. http://
is using HTTP protocol to request a file somewhere, including -- if it's the case -- on your local computer.
Upvotes: 2
Reputation: 55
They have different schemes. One says look on the file system, the other says make a HTTP request.
Upvotes: 1