Enavigo

Take lemons, make lemonade or Jill and Yuval’s Musings

Enavigo header image 2

How browsers detect whether the URL points to a file or a directory

September 1st, 2008 by yuval

Suppose you are a browser and you get a URL like:
http://www.enavigo.com/awesome
How do you know if awesome is a directory or a file?
A really nice hint you’d be nice to give is to append a slash to the URL whenever you denote a directory.

So how *can* you find that out?
The only way I found out had to do with headers. It appears that when web servers are sent a URL like http://www.enavigo.com/awesome and awesome *is* a directory, the response header will redirect the browser (or requestor for that matter) to the properly specified URL
http://www.enavigo.com/awesome/ which has the trailing slash character. I am sure that has to do with server setup.

Need to research this issue more…

Share/Save/Bookmark

Tags:   · · · No Comments

Leave A Comment

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.