按下后退按钮时强制重新加载/刷新 [英] Force reload/refresh when pressing the back button
问题描述
我会尽力解释这一点.
我有一个应用程序,可以在我的 view
页面中显示 50 多个项目.用户可以点击单个项目,进入update
页面更新项目信息.一切正常,除了在用户完成更新单个项目信息并点击浏览器上的返回"按钮到前一个查看页面
.旧的项目信息(更新前)还在.用户必须点击刷新才能看到更新的信息.还不错,但我希望提供更好的用户体验.有什么办法解决这个问题吗?非常感谢.
I have an application that show the 50+ projects in my view
page. The user can click the individual project and go to the update
page to update the project information. Everything works fine except that after user finish updating the individual project information and hit 'back' button on the browser to the previous view page
. The old project information (before update) is still there. The user has to hit refresh to see the updated information. It not that bad, but I wish to provide better user experience. Any idea to fix this? Thanks a lot.
推荐答案
我认为您必须使用 JS 才能完成这项工作,因为 PHP 无法知道用户可以访问哪些浏览器控件...
I think you must work with JS to make this work, since there is no way for PHP to know what browser controlls the user has access to...
也许这会有所帮助:http://www.hunlock.com/blogs/Mastering_The_Back_Button_With_Javascript
这篇关于按下后退按钮时强制重新加载/刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!