diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-09-16 18:18:36 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-09-16 18:18:36 +0000 |
commit | 4558117267b1c7fbfa9c35ad2b0047a456dcc08b (patch) | |
tree | 571c4eb253c4c3ecf2c52360152a35a9cd45b043 /usr/local/www | |
parent | 453074aa4fc90751f97b940097047bfac7a6bfef (diff) | |
download | pfsense-4558117267b1c7fbfa9c35ad2b0047a456dcc08b.zip pfsense-4558117267b1c7fbfa9c35ad2b0047a456dcc08b.tar.gz |
Fix the Traffic Graph for Firefox case, which caches agressively and makes the XMLHttpRequest calls return the same result and the output is just a red line at the end of the graph since the difference between the old and new traffic is always 0.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/graph.php | 6 | ||||
-rw-r--r-- | usr/local/www/ifstats.php | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/usr/local/www/graph.php b/usr/local/www/graph.php index 1202100..7679423 100755 --- a/usr/local/www/graph.php +++ b/usr/local/www/graph.php @@ -36,7 +36,11 @@ ##|*MATCH=graph.php* ##|-PRIV - +header("Last-Modified: " . gmdate( "D, j M Y H:i:s" ) . " GMT" ); +header("Expires: " . gmdate( "D, j M Y H:i:s", time() ) . " GMT" ); +header("Cache-Control: no-store, no-cache, must-revalidate" ); // HTTP/1.1 +header("Cache-Control: post-check=0, pre-check=0", FALSE ); +header("Pragma: no-cache"); // HTTP/1.0 header("Content-type: image/svg+xml"); /********** HTTP GET Based Conf ***********/ diff --git a/usr/local/www/ifstats.php b/usr/local/www/ifstats.php index 9ea65ad..e35f35c 100644 --- a/usr/local/www/ifstats.php +++ b/usr/local/www/ifstats.php @@ -65,6 +65,12 @@ } $temp = gettimeofday(); $timing = (double)$temp["sec"] + (double)$temp["usec"] / 1000000.0; + + header("Last-Modified: " . gmdate( "D, j M Y H:i:s" ) . " GMT" ); + header("Expires: " . gmdate( "D, j M Y H:i:s", time() ) . " GMT" ); + header("Cache-Control: no-store, no-cache, must-revalidate" ); // HTTP/1.1 + header("Cache-Control: post-check=0, pre-check=0", FALSE ); + header("Pragma: no-cache"); // HTTP/1.0 echo "$timing|" . $ifinfo['inbytes'] . "|" . $ifinfo['outbytes'] . "\n"; |