4

Is it bad to use 301, 302 redirects after processing a form submission. Or is it only advised to use for pages that have "really been moved". I can show users nice urls if I use redirects.

Please advice.

Thanks

robert
  • 8,459
  • 9
  • 45
  • 70

2 Answers2

4

No, it is not bad. It's actually recommended best practice and called PRG (POST, Redirect, GET). This prevents users from seeing the nasty "Do you really want to send this form again?" message.

It's recommended that you send 303 (See Other) or 302 (Found). 301 is saying that this resource has been relocated permanently.

alexn
  • 57,867
  • 14
  • 111
  • 145
  • what about using 303 . can i safely use 303? – robert May 26 '11 at 11:44
  • @robert Absolutely. It's actually recommended by the specs (according to the Wikipedia article, havent read the actual spec in a while). – alexn May 26 '11 at 11:45
0

302 Found sounds valid, if you are redirecting the user to the newly created object. However, be aware that some network security scanners (as BlueCoat) may wish to block such redirections.

naivists
  • 32,681
  • 5
  • 61
  • 85