Should a POST request render HTML or redirect?

Should a POST request render HTML or redirect?

I hate this when you are on the page and refresh and make the browser inform you, you will publish the data again.

+5
source share
2 answers

Yes. It must send an entity or redirect!

(Sorry, old programming jokes should come out sometimes).

It really depends on whether you can meaningfully give something GET that it makes sense to stand on it.

Example: I’m buying something, I get a page with the message "thank you, order number yadda yadda, receipt, yadda".

It should be 303 See Other redirect, so I get a page with this information. I can tag it later, refreshing only GET updates. Happy Days.

, , , . .

, . , , , , - - , , , .

, (ASP ..) 302 POST, , POST , . :

  • POST, POST URI - , , , , 307
  • POST GET, - , 303. " GET".
+5

, POST, .

+4

All Articles