Jump to content


Photo

Caching problem


  • Please log in to reply
3 replies to this topic

#1 jayR

jayR
  • Members
  • PipPip
  • Member
  • 26 posts

Posted 13 July 2006 - 04:59 PM

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

#2 Drumminxx

Drumminxx
  • Members
  • PipPipPip
  • Advanced Member
  • 92 posts
  • LocationUSA

Posted 13 July 2006 - 05:02 PM

try this

//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");

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.
:: gucci.com ::
:: blockbuster.com ::

--------------------

#3 pixy

pixy
  • Members
  • PipPipPip
  • Advanced Member
  • 295 posts

Posted 13 July 2006 - 05:02 PM

Just clear the cache.
For IE Tools>Internet Options>Delete Files

This is a .44 Caliber Loveletter straight through my heart.

Tabulas + Threadless + Hire Me!


#4 jayR

jayR
  • Members
  • PipPip
  • Member
  • 26 posts

Posted 13 July 2006 - 05:11 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users