diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-12-04 12:36:00 -0500 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-12-04 12:36:00 -0500 |
commit | 01b089d9be046db1253cb3bb90e8635b50fddd84 (patch) | |
tree | 2a4cee14992807cbe19901743d48bc1447729a35 /plugins/Minify/extlib/minify/min_unit_tests/HTTP_ConditionalGet/5.php | |
parent | 40afc7e9877855272caa5c65fb3575e4420b2966 (diff) |
Added minify plugin
Diffstat (limited to 'plugins/Minify/extlib/minify/min_unit_tests/HTTP_ConditionalGet/5.php')
-rw-r--r-- | plugins/Minify/extlib/minify/min_unit_tests/HTTP_ConditionalGet/5.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/plugins/Minify/extlib/minify/min_unit_tests/HTTP_ConditionalGet/5.php b/plugins/Minify/extlib/minify/min_unit_tests/HTTP_ConditionalGet/5.php new file mode 100644 index 000000000..b443c1973 --- /dev/null +++ b/plugins/Minify/extlib/minify/min_unit_tests/HTTP_ConditionalGet/5.php @@ -0,0 +1,27 @@ +<?php + +set_include_path(get_include_path() . PATH_SEPARATOR . realpath(dirname(__FILE__) . '/../../min/lib')); +require 'HTTP/ConditionalGet.php'; + +// far expires +$cg = new HTTP_ConditionalGet(array( + 'maxAge' => 20 + ,'lastModifiedTime' => filemtime(__FILE__) +)); +$cg->sendHeaders(); + +// generate, send content +$title = 'Last-Modified + Expires'; +$explain = ' +<p>Here we set a static "lastModifiedTime" and "maxAge" to 20. The browser +will consider this document fresh for 20 seconds, then revalidate its cache. After +the 304 response, the cache will be good for another 20 seconds. Unless you force +a reload, there will only be 304 responses for this page after the initial download. +'; + +require '_include.php'; +echo get_content(array( + 'title' => $title + ,'explain' => $explain +)); + |