samedi 8 avril 2017

Why the Post/Redirect/Get pattern (PRG pattern) works?

I have read some articles about the PRG pattern and how it prevents users from resubmitting forms. For example, there is a good picture from this post:

enter image description here

I can understand why no form submission will happen when user refresh the page after 2xx has been received. But I am still wondering:

(1) What happens if the user refreshes the page before the redirect response coming back? At that time, the newest action in the browser is still the POST request, wouldn't that lead to resubmission?

(2) What happens if the user click "back"? Will this lead to resubmission?




Aucun commentaire:

Enregistrer un commentaire