Post/Redirect/Get (PRG) is a web development design pattern that lets the page shown after a form submission be reloaded without submitting the form another time. Some browsers mitigate this risk by warning the user that they are about to re-issue a POST request.
To avoid this problem, many web developers use the PRG pattern—instead of responding with content, the server responds to a POST request by redirecting the client to another location. The HTTP 303 See Other response code to cause the browser to REDIRECT and GET a new page.
The PRG pattern cannot address every scenario of duplicate form submission. For example, if a web user refreshes before the initial submission completes, possibly because of server lag, a duplicate POST occurs in certain user agents.
Source: http://en.wikipedia.org/wiki/
No comments:
Post a Comment