bug - no no-cache headers?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
gregmac

bug - no no-cache headers?

Post by gregmac »

Ian, what were you thinking? :)

Just was helping someone who was having many strange problems, eventually narrowed it down to a proxy and browser-cache, and the fact that cacti has no headers to stop caching!

I usually use the following, it works on pretty much every combination of browser/platform I've tried, and I've never had problems with it.

Throw in include/top_header.php and (as far as I can tell) it should be ok

Code: Select all

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-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
ttyl,greg
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Actually I do include headers that are supposed to stop caching. They are in 'include/auth.php' though since this file is included by all files, including graph viewing pages. Nevertheless yours probably work better, so I replaced mine with that.

-Ian
gregm
Posts: 38
Joined: Mon Oct 21, 2002 4:19 pm

Post by gregm »

Ah, you used "header (..)" with a space. no wonder my grep didn't find it :)

I also didn't look closely to see what was used in all files, but top_header sounded reasonable.

Anyway, glad to help out
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests