diff options
author | Ben Coburn <btcoburn@silicodon.net> | 2006-03-15 12:57:45 +0100 |
---|---|---|
committer | Ben Coburn <btcoburn@silicodon.net> | 2006-03-15 12:57:45 +0100 |
commit | 38f56bff745c0010f5a3d0e13c2de33373616d0e (patch) | |
tree | a4aacde9e2c420ab37a9845925d1a9384204be05 /lib/exe/css.php | |
parent | 254e5c84cc0ef99f63ad829ef4abf3240d05ada6 (diff) | |
download | rpg-38f56bff745c0010f5a3d0e13c2de33373616d0e.tar.gz rpg-38f56bff745c0010f5a3d0e13c2de33373616d0e.tar.bz2 |
Enable '304 Not Modified' responses for CSS and JS.
darcs-hash:20060315115745-05dcb-6f50f3a070d2898ab51a32e59395631cab2ae09c.gz
Diffstat (limited to 'lib/exe/css.php')
-rw-r--r-- | lib/exe/css.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php index 061df662d..ad47647f0 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -67,10 +67,15 @@ function css_out(){ $files[DOKU_CONF.'userstyle.css'] = ''; } - // check cache age + // check cache age & handle conditional request + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); if(css_cacheok($cache,array_keys($files))){ + http_conditionalRequest(filemtime($cache)); readfile($cache); return; + } else { + http_conditionalRequest(time()); } // start output buffering and build the stylesheet |