The POST-REDIRECT-GET pattern
I came across the POST-REDIRECT-GET pattern, or PRG, in Michael Jouravlev’s article
Redirect After Get. The PRG pattern is an attempt to keep an application “fresh.”
The article addresses the familiar problem of a request being submitted twice. For example, a user submits a form and presses F5 on the resulting page. This submits the form again and repeats the same action. Back, forward and reload can put an application in an inconsistent state in several ways.
I’ll admit I haven’t finished reading Redirect After Get, but I find the subject interesting enough to point it out right away. If it catches your interest too, I recommend reading the accompanying discussion, which tends to be very productive.
Related articles
Related CZ Podcast episodes
- #217 · Ivo Lukačovič
On Windy, JavaScript and building companies. · Czech audio
- #3 · Java 6 SE, Vývoj webových aplikací
Dagi and Filemon discuss Java 6 and web application frameworks. · Czech audio