I am new to ASP.Net 4.0, and have seen a new feature called Response.RedirectPermanent()
. I have checked a few articles, but I'm unable to understand clearly the actual meaning and difference of Response.RedirectPermanent()
over Response.Redirect()
.
According to Gunnar Peipman,
Response.Redirect()
returns 302 to browser meaning that asked resource is temporarily moved to other location.Permanent redirect
means that browser gets 301 as response from server. In this case browser doesn’t ask the same resource from old URL anymore – it uses URL given by Location header.
Why do I need to check the server response such as 301
, 302
? And how does it get permanently redirected the page to the server?