dagblog.
← Archive

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.

Medium version

Related articles

Related CZ Podcast episodes