Thanks!
Updating graphs in browser
Moderator: General Moderators
Updating graphs in browser
Hi, my graphs won't update immediately upon changing the data in the database. When I reload the graph page using the reload button from the browser, the graphs get updated, but not when I navigate to the graph page from elsewhere in the site. There must be a way of making the graphs more responsive. (I should mention I'm a relative newbie in PHP.) Any suggestion is greatly appreciated!!
Thanks!
Thanks!
-
jaydrawmer
- Forum Newbie
- Posts: 2
- Joined: Sun Apr 13, 2008 9:41 am
Re: Updating graphs in browser
surely this is a problem with the browser? (as in temporary internet files). Most settings are default to updating automatically, but you can change them to update every time the page is loaded, and other such settings which should act as if the page is being reloaded everytime.
Re: Updating graphs in browser
Hi, jaydrawmer, I didn't consider the browser settings, thanks for the suggestion! I'll look into it.jaydrawmer wrote:surely this is a problem with the browser? (as in temporary internet files). Most settings are default to updating automatically, but you can change them to update every time the page is loaded, and other such settings which should act as if the page is being reloaded everytime.
Re: Updating graphs in browser
Fixing this problem by changing the browser settings will only fix it for you. Everyone else will continue to see the problem.
It's a caching problem. Look at adding headers that tell the browser not to cache the image eg
It's a caching problem. Look at adding headers that tell the browser not to cache the image eg
Code: Select all
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Tue, 01 Jan 2008 01:00:00 GMT");Re: Updating graphs in browser
Thanks, onion2k, I think this is closer to what I was looking for!onion2k wrote:Fixing this problem by changing the browser settings will only fix it for you. Everyone else will continue to see the problem.
It's a caching problem. Look at adding headers that tell the browser not to cache the image eg
Code: Select all
header("Cache-Control: no-cache, must-revalidate"); header("Expires: Tue, 01 Jan 2008 01:00:00 GMT");