1
0
mirror of https://github.com/mrclay/minify.git synced 2025-03-13 17:09:39 +01:00

Allow long expires with "v" query string param

This commit is contained in:
Steve Clay 2014-02-04 11:00:11 -05:00
parent b4b8606dfd
commit 30839ab5f0
2 changed files with 4 additions and 4 deletions

View File

@ -110,9 +110,9 @@ Separate group keys with commas:
FAR-FUTURE EXPIRES HEADERS
Minify can send far-future (one year) Expires headers. To enable this you must
add a number to the querystring (e.g. /min/?g=js&1234 or /min/f=file.js&1234)
and alter it whenever a source file is changed. If you have a build process you
can use a build/source control revision number.
add a number or the parameter "v" to the querystring (e.g. /min/?g=js&1234 or
/min/?g=js&v=1234) and alter it whenever a source file is changed. If you have a
build process you can use a build/source control revision number.
You can alternately use the utility function Minify_getUri() to get a "versioned"
Minify URI for use in your HTML. E.g.:

View File

@ -60,7 +60,7 @@ if ($min_errorLogger) {
}
// check for URI versioning
if (preg_match('/&\\d/', $_SERVER['QUERY_STRING'])) {
if (preg_match('/&\\d/', $_SERVER['QUERY_STRING']) || isset($_GET['v'])) {
$min_serveOptions['maxAge'] = 31536000;
}
if (isset($_GET['g'])) {