mirror of
https://github.com/mrclay/minify.git
synced 2025-08-23 06:02:51 +02:00
Allow long expires with "v" query string param
This commit is contained in:
6
MIN.txt
6
MIN.txt
@@ -110,9 +110,9 @@ Separate group keys with commas:
|
|||||||
FAR-FUTURE EXPIRES HEADERS
|
FAR-FUTURE EXPIRES HEADERS
|
||||||
|
|
||||||
Minify can send far-future (one year) Expires headers. To enable this you must
|
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)
|
add a number or the parameter "v" to the querystring (e.g. /min/?g=js&1234 or
|
||||||
and alter it whenever a source file is changed. If you have a build process you
|
/min/?g=js&v=1234) and alter it whenever a source file is changed. If you have a
|
||||||
can use a build/source control revision number.
|
build process you can use a build/source control revision number.
|
||||||
|
|
||||||
You can alternately use the utility function Minify_getUri() to get a "versioned"
|
You can alternately use the utility function Minify_getUri() to get a "versioned"
|
||||||
Minify URI for use in your HTML. E.g.:
|
Minify URI for use in your HTML. E.g.:
|
||||||
|
@@ -60,7 +60,7 @@ if ($min_errorLogger) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check for URI versioning
|
// 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;
|
$min_serveOptions['maxAge'] = 31536000;
|
||||||
}
|
}
|
||||||
if (isset($_GET['g'])) {
|
if (isset($_GET['g'])) {
|
||||||
|
Reference in New Issue
Block a user