diff options
author | Ben Coburn <btcoburn@silicodon.net> | 2006-04-10 03:27:23 +0200 |
---|---|---|
committer | Ben Coburn <btcoburn@silicodon.net> | 2006-04-10 03:27:23 +0200 |
commit | 07525e80d6c29fb65bd5fff8206cb92bf74fa6b4 (patch) | |
tree | da1dde064ff30b3517b3aaeaa1b4fe1a4f61229b | |
parent | 26d75eef3ac77f55d63b06c86be12de47fcdf4ac (diff) | |
download | dokuwiki-07525e80d6c29fb65bd5fff8206cb92bf74fa6b4.tar.gz dokuwiki-07525e80d6c29fb65bd5fff8206cb92bf74fa6b4.zip |
CSS and JS cache-control tweak
Tells standards compliant browsers that conditional requests for
CSS and JS need only be made once an hour. This should reduce page
display latency on some browsers.
Originated from the comment in this thread:
http://www.freelists.org/archives/dokuwiki/03-2006/msg00590.html
darcs-hash:20060410012723-05dcb-eccb42aefe85c9dbb4f35fdf03a9635561cf5710.gz
-rw-r--r-- | lib/exe/css.php | 2 | ||||
-rw-r--r-- | lib/exe/js.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php index 5b4e560f4..d0b9461eb 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -67,7 +67,7 @@ function css_out(){ } // check cache age & handle conditional request - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Cache-Control: public, max-age=3600'); header('Pragma: public'); if(css_cacheok($cache,array_keys($files))){ http_conditionalRequest(filemtime($cache)); diff --git a/lib/exe/js.php b/lib/exe/js.php index 0615db374..f18edc5d6 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -56,7 +56,7 @@ function js_out(){ $plugins = js_pluginscripts(); // check cache age & handle conditional request - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Cache-Control: public, max-age=3600'); header('Pragma: public'); if(js_cacheok($cache,array_merge($files,$plugins))){ http_conditionalRequest(filemtime($cache)); |