Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Does A Trailing Slash Matter?


  • Please log in to reply
1 reply to this topic

#1 lister

lister

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 415 posts

Posted 25 August 2012 - 09:13 PM

Is there any difference between i.e. mysite/mydirectory and i.e. mysite/mydirectory/ (not the trailing slash)

I googled before posting and apparently the trailing slash traditionally means that there IS a file in the directory so please take a look.

What do you guys do?

I always have an index file in a directory and normally add a / to it - is that ok?

#2 chrishirst

chrishirst

    A not so moderate moderator.

  • Moderator
  • 6,729 posts
  • Location:Blackpool UK

Posted 26 August 2012 - 11:33 AM

Not quite right;

The trailing slash indicates to the server that the URIs definitely point TO a directory and the server should deliver the content from the first index file in the list rather than try to locate a file called "directory". This is mainly because the Unix file system does not require a file extension to identify the file type as it does so from the contenttype headers.

So with the trailing slash, it does require slightly less work by the server to respond with the content, but we are only talking in microseconds.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!