$lastModified )); $cg->sendHeaders(); if ($cg->cacheIsValid) { // we're done exit(); } $title = 'Last-Modified is known : simple usage'; $explain = '
If your content has not changed since a certain timestamp, set this via the
the lastModifiedTime
array key when instantiating HTTP_ConditionalGet.
You can immediately call the method sendHeaders()
to set the
Last-Modified, ETag, and Cache-Control headers. The, if cacheIsValid
property is false, you echo the content.
This script emulates a document that changes every ' .$every. ' seconds.
This is version: ' . date('r', $lastModified) . '