uncleronin Posted March 14, 2007 Share Posted March 14, 2007 I'm using a bunch of graphs all over my site to display various statistics. Some pages have lots, some have one. The big issue is that if I display the graphs for a particular page multiple times in a row (changing the parameters each time) the graphs don't refresh. Instead the same graphs are shown each time! Is this because of caching or some php setting or some apache setting (using apache2 btw)? Is there any way to get around this or to force the graphs to refresh? Quote Link to comment Share on other sites More sharing options...
chrisuk Posted March 14, 2007 Share Posted March 14, 2007 I have noticed the same issue. Perhaps use javascript to force a page refresh after it loads? Quote Link to comment Share on other sites More sharing options...
uncleronin Posted March 15, 2007 Author Share Posted March 15, 2007 Refreshing the page doesn't help. I've even gone so far as to prevent the actual page from caching but that doesn't do much either. Then again, images cache differently to pages. In IE the graphs refresh nicely but in FF the caching is handled differently so they dont refresh. I dunno, maybe FF has a cache setting somewhere but I have no idea how to force it to refresh pages. Maybe there's something in PHP which does this? Quote Link to comment Share on other sites More sharing options...
o3d Posted March 15, 2007 Share Posted March 15, 2007 Maybe try this in your script: <?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past ?> taken from www.php.net Quote Link to comment Share on other sites More sharing options...
uncleronin Posted March 16, 2007 Author Share Posted March 16, 2007 I've tried using no-cache but not with must-revalidate. Will see what happens. Quote Link to comment 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.