Using "/" at end of links to speed site?

I recently read about this method of speeding up a site (from dailyblogtips site post a couple years ago)…

“When a server opens a link in the form of “” it will need to figure what kind of file or webpage is contained on that address, wasting time on the process. If instead of using that link you include a slash (“/”) at the end like “” the web server will already know that the link points to a directory, reducing the time to load the page.”

The article didn’t go into naming the actual html files and I had a few questions. I currently name my pages this way… index.html, about.html, etc. They Reside in public_html folder on an Apache server running linux.

If adding the slash at the end of the <a href>, how would I then name index.html file so it is recognized by server? instead of index.html, would it be ? ? ? Something else?

Do I need to name each html file with a slash so server recognizes them? e.g. http:://www.domain/about.html/ instead of http://www.domain.html/about.html ?

Anything else I should know before doing this?

I’m trying to optimize site speed as best I can (even if just a little) and this seems a simple way to help towards that end, but I’ve tried “simple” things before and spent days trying to figure them out :wink:

Appreciated any insight. Thanks.

ps: I apologize if links are active - tried removing links, but didn’t seem to work

Hi everyone, Thanks for the replies. This looked like an easy thing to do but it seems the gains are negligible for a site like mine.

I’m looking to speed up my .flv files, so going to be investigating caching next.
btw, These boards are a great resource for inexperienced site builders like myself. Appreciate all the insight.

Since a closing / tells the system that it is a directory and so not to bother looking for a file, adding a closing / will not help at all with speeding up file access.

If you don’t have a redirect set up then it works like this:

If the name doesn’t end in a slash then the server looks for a file by that name and if it doesn’t find one it tries again looking for a directory and if it doesn’t find that then 404.
If the name ends in a slash it looks for a directory first and if it doesn’t find that then 404.

so adding the slash to the ends of the directory names saves an attempted file lookup.

With a redirect you are forcing the extra step of redirecting anyway and so you don’t get the saving, would be looking for the default page in the contact.html directory (usually

Hey man, this “with or without slash” will bring 0.0000000001% gain in performance, so do never mind. What will make your site faster is for example client optimization and caching

I think it only applies to directories, not to files.
[noparse][/noparse] just doesn’t make any sense.

is the advice not specifically for when you have the server set up in such a way so that a request gets redirected to ?

e.g. gets redirected to

so the advice is about redirection avoidence.

but it depends on how you have the server set up. i personally prefer urls so i redirect from to in that case not having a trailing slash is more efficient.