note 56051 deleted from function.header by victor
| From: | victor@php.net | Date: | Mon, 22 Aug 2005 08:01:36 +0000 |
| Subject: | note 56051 deleted from function.header by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-94016@lists.php.net to get a copy of this message | ||
Note Submitter: angel at webmasterangel dot com
----
Note that a redirect always introduces a delay in the loading of a page. It can take several seconds
for a browser just to follow the redirect and download the final http header for the page you are
redirecting to.
My site measures the response time of American web hosting providers. As an example, just
downloading the http header for smallbusiness.yahoo.com from Miami or Seattle, USA, typically takes
around 425 ms, which indicates that no redirect is used for their starting page. When accessing the
same site from Brisbane in Australia, the header download time is slightly over 800 ms.
Compare this with 1and1.com, that has a 900 ms header download time from Miami or Seattle,
indicating that at least one redirect is involved. From Brisbane, it takes almost 2500 ms just to
follow this redirect and download the final http header for 1and1.com.
You may want to be very careful when using redirects in a site with an international audience. If
you can use absolute links in the target page you may have several alternatives:
- Use require() instead, which is much faster.
- If you are always redirecting users from the root to a folder, e.g. from a.com/index.php to
a.com/en/index.php, consider just copying the folder version of the file to the root.