A web application development technique, in which applications, in response to HTTP POST requests, redirect their browser clients to a results page to be retrieved via HTTP GET, rather than responding immediately to the POST. This is intended to defend against accidental resubmission of POSTed forms when pages are revisited via the browser's back/forward buttons, and preserve the semantics of the HTTP verbs GET and POST.
Also known as PostRedirectGet (PRG).
Redirect After Post - By Michael Jouravlev - 01 Aug 2004 | TheServerSide.com
- All interactive programs provide two basic functions: obtaining user input and displaying the results. Web applications implement this behavior using two HTTP methods: POST and GET respectively. This simple protocol gets broken when application returns web page in response to POST request. Peculiarities of POST method combined with idiosyncrasies of different browsers often lead to unpleasant user experience and may produce incorrect state of server application. This article shows how to design a well-behaved web application using redirection.
A simple example application demonstrating the principle: