|WikiProject Computing||(Rated Stub-class)|
The example here is wrong, as it hints that a relative URI is returned in the Location header field, whereas the RFC states that this is an absoluteURI (see http://tools.ietf.org/html/rfc2616#section-14.30).
It should be:
301 Moved Permanently Location: http://www.example.org/login.php
It would be nice to include practical information about current browsers. In my testing, IE6 and Firefox 3.57 currently treat HTTP 301 and HTTP 302 exactly the same. Any request for a URL which previously resulted in an HTTP 301 is still sent to the server and a new HTTP 301 is received. Chrome 3.0 threats HTTP 301 differently and will cache the URLs and redirect (on the client, without a server call) subsequent requests for the same URL to the moved location. But even in Chrome this "permanent" redirection only lasts for the current browser instance. As soon as Chrome is closed and reopened a subsequent request will still be sent to the server.
I believe I've read, but have not verified, that search engines will treat HTTP 301 responses appropriately.
- I'm not convinced the example is a good one. The 301 status code is a permanent redirection, which is not adequate for redirecting to a login page. 22.214.171.124 (talk) 02:35, 31 January 2010 (UTC)