2013年4月17日 星期三

Redirect and RedirectPermanent are different

1. Microsoft introduced new Response.RedirectPermanent() in .NET 4.0 which might be confusing.

2. But the purpose of this Response.RedirectPermanent() is as its name says for permanent redirection. When you use Response.RedirectPermanent() it will return back Http Response 301 Status Code which means permanent redirection to diferent location.

3. This may not be any value for end user using the browser but for search engines it will help the search engines not to index permanently redirected urls.

4. However, on the other hand old Response.Redirect() is for temporary redirection with Http Response 302 Status Code. This means, the url is temporarily redirected to new url.

5. More info on http response codes: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

沒有留言:

張貼留言