jayR Posted July 13, 2006 Share Posted July 13, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/14505-caching-problem/ Share on other sites More sharing options...
Drumminxx Posted July 13, 2006 Share Posted July 13, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/14505-caching-problem/#findComment-57442 Share on other sites More sharing options...
pixy Posted July 13, 2006 Share Posted July 13, 2006 Just clear the cache.For IE Tools>Internet Options>Delete Files Quote Link to comment https://forums.phpfreaks.com/topic/14505-caching-problem/#findComment-57445 Share on other sites More sharing options...
jayR Posted July 13, 2006 Author Share Posted July 13, 2006 Thanks Drumminxx, that did it. And I couldn't just clear the cache each time because I didn't want to users to have to do that when they were viewing the reports. That would sure get annoying fast for them. Quote Link to comment https://forums.phpfreaks.com/topic/14505-caching-problem/#findComment-57448 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.