强制重新加载/刷新时按下后退按钮

问题描述:

我会尽我所能解释这个。

I will try my best to explain this.

我有一个应用程序可以在我的视图页面中显示50多个项目。用户可以单击单个项目,然后转到更新页面更新项目信息。除了在用户更新单个项目信息并在浏览器上点击返回按钮到上一个查看页面之后,一切都正常。旧项目信息(更新前)仍然存在。用户必须按刷新才能看到更新的信息。这不是坏事,但我希望提供更好的用户体验。任何想法来解决这个问题?非常感谢。

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