From 2ebbb0bc13e3f3f5d7c2cf6e78757de57c7201f3 Mon Sep 17 00:00:00 2001 From: Jose Luis Duran Date: Tue, 14 Apr 2015 20:02:54 -0300 Subject: Remove pre-check and post-check from Cache-Control If both `post-check` and `pre-check` are specified and set to `0`, both are entirely ignored: http://blogs.msdn.com/b/ieinternals/archive/2009/07/20/using-post_2d00_check-and-pre_2d00_check-cache-directives.aspx --- usr/local/captiveportal/index.php | 2 +- usr/local/www/getstats.php | 2 +- usr/local/www/graph.php | 2 +- usr/local/www/graph_cpu.php | 2 +- usr/local/www/guiconfig.inc | 2 +- usr/local/www/ifstats.php | 2 +- usr/local/www/status_queues.php | 2 +- usr/local/www/status_rrd_graph_img.php | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 0e65a26..2d256b2 100644 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -40,7 +40,7 @@ require_once("captiveportal.inc"); $errormsg = "Invalid credentials specified."; header("Expires: 0"); -header("Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0"); +header("Cache-Control: no-cache, no-store, must-revalidate"); header("Pragma: no-cache"); header("Connection: close"); diff --git a/usr/local/www/getstats.php b/usr/local/www/getstats.php index 279aacb..dcbb8d3 100644 --- a/usr/local/www/getstats.php +++ b/usr/local/www/getstats.php @@ -39,7 +39,7 @@ 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-cache, no-store, must-revalidate, pre-check=0, post-check=0" ); // HTTP/1.1 +header("Cache-Control: no-cache, no-store, must-revalidate" ); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 require_once("guiconfig.inc"); diff --git a/usr/local/www/graph.php b/usr/local/www/graph.php index 6bd8a2b..7862257 100755 --- a/usr/local/www/graph.php +++ b/usr/local/www/graph.php @@ -45,7 +45,7 @@ require("guiconfig.inc"); 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-cache, no-store, must-revalidate, pre-check=0, post-check=0" ); // HTTP/1.1 +header("Cache-Control: no-cache, no-store, must-revalidate" ); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 header("Content-type: image/svg+xml"); diff --git a/usr/local/www/graph_cpu.php b/usr/local/www/graph_cpu.php index 7fa0225..2258f8a 100644 --- a/usr/local/www/graph_cpu.php +++ b/usr/local/www/graph_cpu.php @@ -44,7 +44,7 @@ require_once("guiconfig.inc"); 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-cache, no-store, must-revalidate, pre-check=0, post-check=0" ); // HTTP/1.1 +header("Cache-Control: no-cache, no-store, must-revalidate" ); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 header("Content-type: image/svg+xml"); diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index b73ce77..22ca7ba 100644 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -47,7 +47,7 @@ if(!$nocsrf) { if (!$omit_nocacheheaders) { header("Expires: 0"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0"); + header("Cache-Control: no-cache, no-store, must-revalidate"); header("Pragma: no-cache"); } diff --git a/usr/local/www/ifstats.php b/usr/local/www/ifstats.php index 5b3c1e8..56c46b4 100644 --- a/usr/local/www/ifstats.php +++ b/usr/local/www/ifstats.php @@ -57,7 +57,7 @@ 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-cache, no-store, must-revalidate, pre-check=0, post-check=0" ); // HTTP/1.1 + header("Cache-Control: no-cache, no-store, must-revalidate" ); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 echo "$timing|" . $ifinfo['inbytes'] . "|" . $ifinfo['outbytes'] . "\n"; diff --git a/usr/local/www/status_queues.php b/usr/local/www/status_queues.php index fd32348..6b4be32 100644 --- a/usr/local/www/status_queues.php +++ b/usr/local/www/status_queues.php @@ -44,7 +44,7 @@ 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-cache, no-store, must-revalidate, pre-check=0, post-check=0" ); // HTTP/1.1 +header("Cache-Control: no-cache, no-store, must-revalidate" ); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 require("guiconfig.inc"); diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php index 4a136ac..74e7d3f 100644 --- a/usr/local/www/status_rrd_graph_img.php +++ b/usr/local/www/status_rrd_graph_img.php @@ -1263,7 +1263,7 @@ if(($graphcmdreturn <> 0) || (! $data)) { header("Content-type: image/png"); 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, no-store, must-revalidate, pre-check=0, post-check=0"); + header("Cache-Control: no-cache, no-store, must-revalidate"); header("Pragma: no-cache"); $file= "/usr/local/www/themes/{$g['theme']}/images/misc/rrd_error.png"; readfile($file); @@ -1273,7 +1273,7 @@ if(($graphcmdreturn <> 0) || (! $data)) { header("Content-type: image/png"); 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, no-store, must-revalidate, pre-check=0, post-check=0"); + header("Cache-Control: no-cache, no-store, must-revalidate"); header("Pragma: no-cache"); readfile($file); } -- cgit v1.1