Jump to content

Caching problem


jayR

Recommended Posts

I'm working with a report that is generated from our database.  It seems to be working fine, except once in a while IE will cache the results and you'll have to refresh the page multiple times or sometimes even close the browser and reopen it in order for the newest results to be displayed.  I have header("Cache-control: private"); on the top of each of my pages, so I'm not sure what else I can do.  Any help would be appreciated.  Thanks
Link to comment
https://forums.phpfreaks.com/topic/14505-caching-problem/
Share on other sites

try this

[code]
//Send some headers to keep the user's browser from caching the response.
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
header("Cache-Control: no-cache, must-revalidate" );
header("Pragma: no-cache" );
header("Content-Type: text/html; charset=utf-8");
[/code]

This is kind of strange though. I know that IE has some caching issues that I think are a real pain but I never had a problem with phpand ie caching, it wasn't until I started using Ajax that it gave me a headache. in any event the above is what I have been using on my Ajax pages and it should work good for you too.
Link to comment
https://forums.phpfreaks.com/topic/14505-caching-problem/#findComment-57442
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.