允许用户刷新浏览器而不使用“确认表单重新提交”弹出 [英] Allowing users to Refresh browser without the "Confirm Form Resubmission" pop-up

查看:527
本文介绍了允许用户刷新浏览器而不使用“确认表单重新提交”弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个登录系统,登录后,如果刷新浏览器,Chrome会显示一个标题为确认表单重新提交的弹出窗口。我假设其他浏览器会发生同样的事情。

I have a login system, and while logged in, if I refresh the browser, Chrome shows a pop up window titled "Confirm Form Resubmission." I assume that the same thing would happen with other browsers.

如果没有此确认弹出窗口,我怎样才能刷新浏览器?当然,我还希望在刷新浏览器时保持登录状态。

How can I allow the browser to be refreshed without this confirmation pop-up window? Of course, I would also like to stay logged in while refreshing the browser.

推荐答案

处理完POST页面后,重定向用户到同一页。

After processing the POST page, redirect the user to the same page.

http://test.com/test.php

header('Location: http://test.com/test.php');

这将删除该框,因为刷新页面不会重新提交数据。

This will get rid of the box, as refreshing the page will not resubmit the data.

这篇关于允许用户刷新浏览器而不使用“确认表单重新提交”弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆