简体   繁体   English

浏览器问题,即执行某些操作时未刷新页面

[英]browser issue, ie is not refreshing the page when some action performed

I'm using jsp,spring mvc for my application where i can create,update or delete a record. 我在我的应用程序中使用jsp,spring mvc,可以在其中创建,更新或删除记录。 I could not able to see the changes getting effected once the application is created. 创建应用程序后,我看不到更改生效。 The functionality differs in each browser. 每个浏览器的功能都不同。

It seems a cache related problem. 似乎是与缓存有关的问题。 You could try to insert no-cache pragma to tell do not chache page to the browser. 您可以尝试插入no-cache杂注以告诉浏览器不要阻塞页面。

It could be done by http headers or meta ( Solution1 , Solutuion2 ). 这可以通过http标头或meta( Solution1Solutuion2 )完成。

Another way, but dirty, is to append a timestamp as query string parametert to make different url to the browser. 另一种方法是肮脏的,但要附加时间戳作为查询字符串形参,以使浏览器使用不同的URL。

In the page that you are having trouble with, put this at the top: 在您遇到问题的页面中,将其放在顶部:

 response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
 response.setHeader("Pragma","no-cache");

This will force IE to stop caching it. 这将迫使IE停止对其进行缓存。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM