0

Why does RedirectToAction() return an HTTP 301 in Chrome and 302 in incognito mode? Isn't it meant to always return 302?

I tested RedirectToActionPermanent() and it returns 301 in normal and incognito mode as expected.

David Klempfner
  • 6,679
  • 15
  • 47
  • 102
  • Are you sure. Server will have no idea whether browser is incognito or not. – phuzi Jun 25 '18 at 12:22
  • 1
    It always returns 302. My guess is that at some point in the past you were playing around and used `RedirectToActionPermanent`? In which case, the browser has cached that (which is understandable - you told it it was **permanent**). – mjwills Jun 25 '18 at 12:43
  • @mjwills you're right. I did initially play around with RedirectToActionPermanent – David Klempfner Jun 25 '18 at 23:12

0 Answers0