Reputation: 8717
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
Upvotes: 4
Views: 616
Reputation: 58952
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.
Upvotes: 4
Reputation: 33491
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.
Upvotes: 0