Download the PHP package secra/caching-proxy without Composer
On this page you can find all versions of the php package secra/caching-proxy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package caching-proxy
CachingProxy
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.
Main features are
- detect last version of .css and .js Source files
- detect .min version of .css and .js files
- combine all .css and .js files to one cached file
- auto create gzip version of cached file
- depend on mod rewrite and browser, deliver precompressed files
- debugmode for development and native, unmodified inclusion of files
Usage
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();
Demo page
The /demo folder contain a sample webpage with the CSS and Javascript.
Changelog
Version 1.0 (04. Jan 2021)
- Upgrade PHP Version
- Switch to docker for local demo
Version 0.2 (18. July 2014)
- Rewrite relative path of ressources in css files
Version 0.1 (16. February 2014)
- Add Composer Support
- PSR-4 compatible
- EditorConfig Support
- Add Licence Text
- Add usage example in readme
Developer notes
See Developer_Info.md under folder vagarnt-vm
All versions of caching-proxy with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.2
ext-zlib Version *
ext-zlib Version *
The package secra/caching-proxy contains the following files
Loading the files please wait ....