简体   繁体   中英

Internet Explorer caching issue

I have a website that offers a service to subscribed members. It has been reported to me that one of the pages that has a form used to submit data to a mysql database has not been displaying saved changes.

The form should display back data that has been stored in the database. (After the page has been submitted)

I thought this was odd, as I was under the impression that php pages could not be cached.

I have tried using:

header("Cache-Control: no-cache");
header("Expires: -1");

and private mode in IE8 but this made no difference.

This problem does not occur when using any other browser other than Internet explorer 6/7/8

Any help would be greatly appreciated.

What happens if you append a garbage variable to the end of the URL string? Does it still cache it?

http://site.com/path/page?random=JH4kdhkj3

It not the best because you clutter up the URL, but I'm curious what happens.

您应该使用Fiddler之类的HTTP调试器来跟踪流量,并阅读http://www.enhanceie.com/redir/?id=httpperf以了解HTTP缓存的工作原理。

Had the same problem with one of our clients. IE cache settings were set to " Never check for new version ". The issue was fixed after setting it to " Automatic ". I know this question is 4 years old but I hope my answer can still help others who are struggling with IE.

也许您可以尝试使用无意义的查询字符串将其发布回预期将在其中找到更改的页面,以强制浏览器获取新页面。

如何在中添加以下内容:

<meta http-equiv="Pragma" content="no-cache" />

Thanks for your responses guys.

After looking into the matter further, the problem seems to be with session_start(), if I remove this from the page the data entry and display works as intended.

I'm not sure what the exact problem is with sessions in IE, but I'm going to install fiddler and see if I can find out whats going on.

Thanks again

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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