Response.Redirect HTTP status code

前端 未结 5 1604
梦如初夏
梦如初夏 2020-12-06 00:10

Why is it that ASP/ASP.NET Response.Redirect uses a HTTP-302 status code (\"Moved Temporarily\") even though in most cases a HTTP-301 status code (\"Moved Permanently\") wou

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-06 01:07

    In addition to the answer from Heinzi, the only entity on the web that is likely to take much notice of the 301 would be the search engines. Most browsers will not track and record 301 in order automatically redirect any subsequent request for the initial URL. Browsers treat 301 identically to how they treat 302. Hence 302 in dynamic content such as generated in ASP.NET is quite appropriate.

提交回复
热议问题