5

I'm just started web developing not long ago, and I'm wondering why running HTML on my computer comes up with file:/// and then the file path and name in the browser url bar. For example, what I'm testing right now is:

file:///D:/WebDesign/HTML/test/default.html

Why isn't it file://, or just the pathname?

Is there a certain reason for this?

thanks for any answers.

asked Sep 5, 2013 at 15:55

3 Answers 3

4

// is part of the general format of URI schemes.

The next / comes after the optional — if defaults to localhost — hostname (since you can have a network path for file URIs).

See the Wikipedia article for more details.

answered Sep 5, 2013 at 15:59
Sign up to request clarification or add additional context in comments.

Comments

1

It is a standard URL code for a local file. Also Check out this:-

the slash is a general, system-independent way of separating the parts, and in a particular host system it might be used as such in a pathname (as in Unix systems) or internally mapped to another character

answered Sep 5, 2013 at 15:59

Comments

0

That is just standard URL code for a local file. A similar syntax is used to refer to a file on a network drive.

However, if you are attempting to develop like that you will run into problems, especially if you intend to test server-side functionality in languages like PHP. You may wish to look into installing a (free) program such as XAMPP or WAMP/MAMP that will emulate an apache server and allow you to test these things.

You can find some very helpful (free) tutorial videos here

Look at the first three videos here

And here's another that discusses installing XAMPP/WAMP

answered Sep 5, 2013 at 16:00

2 Comments

I'm not really developing - it's just for testing. and yes, I do have XAMPP, but i don't really need it right now, i'm using plain html.
@Jon:- You can check out the link which I have added in my answer. That will help you!!!

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.