logo small

PHP Browser Cache Handler: Issue HTTP not modified response for cached files

Recommend this page to a friend!
Download Download
Info Documentation View files Files Install with Composer Install with Composer Download Download Reputation Support forum Blog Links
Last Updated Ratings Unique User Downloads Download Rankings
2025年10月07日 (4 hours ago) RSS 2.0 feed Not enough user ratings Total: 61 All time: 10,489 This week: 62Up
Version License PHP version Categories

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.

Picture of Ramesh Narayan Jangid (Sharma)
Performance Level
Name: Ramesh Narayan Jangid ... <contact>
Classes: 11 packages by
Country: India India
Age: 49
All time rank: 3033190 in India India
Week rank: 195 Up19 in India India Up
Innovation award
Innovation award
Nominee: 5x

Winner: 4x

Documentation

Cache Handler

Issue "HTTP/1.1 304 Not Modified" response for cached files

Usage

require_once __DIR__ . '/AutoloadCacheHandler.php';
use CacheHandler\CacheHandler;
$filePath = $_GET['file'];
$cacheHandler = new CacheHandler();
$cacheHandler->init($filePath);

Files folder image Files (5)
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

Files folder image Files (5) / CacheHandler
File Role Description
Plain text file CacheHandler.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Version Control Unique User Downloads Download Rankings
100%
Total: 61
This week: 0
All time: 10,489
This week: 62 Up
About us About us Advertise on this site Advertise on this site Site map Site map Newsletter Newsletter Statistics Statistics Site tips Site tips Privacy policy Privacy policy Contact Contact

AltStyle によって変換されたページ (->オリジナル) /