-- Practice Midterm Problem Thread
Group Members: Alan Ngo, Siddhita Joshi, Tyler Nguyen
Question 8: Briefly describe the POST-REDIRECT-GET Pattern
When a form is submitted using the POST method, the data is sent in the request body.
If the user refreshes or clicks the back button, the data would be submitted again if
the user clicks the confirmation button. To fix this, we can use the POST-REDIRECT-GET
pattern to redirect using a 301 redirect and a location header. The user will be sent
to a safe page using a GET request. This allows the user to bookmark the page, refresh,
or use the back button without resubmitting the data.
(
Edited: 2022-10-10)
Group Members: Alan Ngo, Siddhita Joshi, Tyler Nguyen
Question 8: Briefly describe the POST-REDIRECT-GET Pattern
When a form is submitted using the POST method, the data is sent in the request body.
If the user refreshes or clicks the back button, the data would be submitted again if
the user clicks the confirmation button. To fix this, we can use the POST-REDIRECT-GET
pattern to redirect using a 301 redirect and a location header. The user will be sent
to a safe page using a GET request. This allows the user to bookmark the page, refresh,
or use the back button without resubmitting the data.