强制重新加载/刷新时按下后退按钮 [英] Force reload/refresh when pressing the back button

查看:156
本文介绍了强制重新加载/刷新时按下后退按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我会尽我所能解释这个。

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

这篇关于强制重新加载/刷新时按下后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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