Browse files

Set the public directive on the Cache-Control header since this is HT…

…TP/1.1, Pragma is a hack for very old things. Also fixed maxage to be max-age
  • Loading branch information...
1 parent f1b817f commit c8e396bd07a5423c1b9eaf806a555e8de405b26e @Seldaek Seldaek committed Sep 4, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 adaptive-images.php
@@ -127,8 +127,7 @@
/* helper function: Send headers and returns an image. */
function sendImage($filename, $mime_type, $browser_cache) {
- header("Pragma: public");
- header("Cache-Control: maxage=".$browser_cache);
+ header("Cache-Control: public, max-age=".$browser_cache);
header('Expires: '.gmdate('D, d M Y H:i:s', time()+$browser_cache).' GMT');
header('Content-Length: '.filesize($filename));

0 comments on commit c8e396b

Please sign in to comment.