YSlow: Avoid URL redirects


Avoid using URL redirects as they add additional delays to a page load.

How does your site score on this recommendation?

Details from Yahoo!

URL redirects are made using HTTP status codes 301 and 302. They tell the browser to go to another location.

Inserting a redirect between the user and the final HTML document delays everything on the page since nothing on the page can be rendered and no components can be downloaded until the HTML document arrives.



YSlow recommends:

One of the most wasteful redirects happens frequently and web developers are often not aware of it.

It occurs when a trailing slash (/) is missing from a URL that should otherwise have one.

For example, going to results in a 301 response containing a redirect to (notice the added trailing slash).

This is fixed in Apache by using Alias or mod_rewrite, or the DirectorySlash directive if you're using Apache handlers.

Connecting an old web site to a new one is another common use for redirects. Others include connecting different parts of a website and directing the user based on certain conditions (type of browser, type of user account, etc.).

Read More

Related PageSpeed Recommendations