Web Browsers Append "/" to URL

  • Thread starter Thread starter Mike
  • Start date Start date
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!
 
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
 
Back
Top