Author
This class can issue HTTP, not modified response for cached files.
It can check the current HTTP request to verify if it contains headers like If-None-Match or If-Modified-Since to determine if it will serve a given file or issue a 304 Not Modified HTTP status response.
The class can serve a given file as a response when it verifies that the browser does not have an up-to-date version of the specified file.
The file is served with a given Etag header value to let the browser determine the specific file version the server is sending.
Issue "HTTP/1.1 304 Not Modified" response for cached files
require_once __DIR__ . '/AutoloadCacheHandler.php';
use CacheHandler\CacheHandler;
$filePath = $_GET['file'];
$cacheHandler = new CacheHandler();
$cacheHandler->init($filePath);
File | Role | Description | ||
---|---|---|---|---|
Files folder imageCacheHandler (1 file) | ||||
Plain text file Autoload.php | Class | Class source | ||
Accessible without login Plain text file AutoloadCacheHandler.php | Aux. | Configuration script | ||
Accessible without login Plain text file LICENSE | Lic. | License text | ||
Accessible without login Plain text file README.md | Doc. | Documentation |
File | Role | Description |
---|---|---|
Plain text file CacheHandler.php | Class | Class source |
Add link image If you know an application of this package, send a message to the author to add a link here.