Web Browsers Append "/" to URL

M

Mike

This question isn't a true ASP.NET-related question, but I don't know where
else to post it.

Why do web browsers automatically append URL's with a forward-slash (/)?
For example, if you type http://www.amazon.com into your web browser, your
web browser will change it to http://www.amazon.com/.

This is a question of curiosity, like I said, and isn't an ASP.NET question.
I simply want to know the reasons why it does this. Thanks!
 
T

Tom Dacon

If there's no trailing slash, the web site sends a message back to the web
browser, asking if the url represents a file name or a web address, and so
there's one round-trip between the browser and the site before the page gets
served up. When the browser appends the slash before doing the HTTP request,
it avoids that overhead.

Tom Dacon
Dacon Software Consulting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,149
Latest member
Vinay Kumar Nevatia0
Top