Saturday, November 04, 2006

A slash with some "dash"

Another tip for improving Web performance. It might only have a marginal or imperceptible effect, but as they say Every little counts.

I've been doing this for years and couldn't for the life of me remember why until I recently came across the explanation in this Internet Explorer blog article.

When entering hyperlinks -- in a browser's address bar, or when editing hyperlinks in a web page -- you should always put a trailing backslash if possible (where it is allowable).

The example given in the article is:

For instance, navigating to http://msdn.microsoft.com/ie takes one more roundtrip than http://msdn.microsoft.com/ie/ When the browser navigates to the /ie url, the server merely sends down a 301 to the /ie/ url. Both links work, but the second version is faster.
So when you omit the trailing slash the server has a bit more work to do, there's a bit more network traffic, and you have to wait a bit longer (perhaps only a tiny bit, but it all counts). All in all, this means some amount of increased overhead.

Didja know that?

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.