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:
parent
b4b8606dfd
commit
30839ab5f0
6
MIN.txt
6
MIN.txt
@ -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.:
|
||||
|
@ -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'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user