Merge all css and js file into one file and gzip to fast delivery
MIT License
Caching Proxy Class
The CachingProxy include css and js files in other php scripts and build a path to the files, with an timestamp of the last modification in it.
For .css files use the following code in the head of your webpage. The usage for .js should be obvious.
// set the path to you webserver document root most of the time $_SERVER["DOCUMENT_ROOT"]
// and in 2. parameter the path, were you would like to store your cached files absolut from document root
$css_cache = new \secra\CachingProxy\CssCachingProxy($_SERVER["DOCUMENT_ROOT"], "/path/to/css/cache");
// Add some files
$css_cache->addFile("/path/to/file1.css");
$css_cache->addFile("/path/to/file2.css");
// Do the packing work and print the html into the head
echo $css_cache->getIncludeHtml();
The /demo folder contain a sample webpage with the CSS and Javascript.
###Version 1.0 (04. Jan 2021)
###Version 0.2 (18. July 2014)
###Version 0.1 (16. February 2014)
See Developer_Info.md under folder vagarnt-vm