且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

停止浏览器要求在刷新时重新发送表单数据

更新时间:2023-09-01 10:41:34

您需要使用 POST-Redirect-GET 模式.

You need to use the the POST-Redirect-GET pattern.

通过重定向到 GET 请求使您的表单响应.
这样,当用户刷新页面时,只会重新发送GET.

Make your form respond with a redirect to a GET request.
This way, when the user refreshes the page, it will only resend the GET.