Skip to content

Commit

Permalink
Allow long expires with "v" query string param
Browse files Browse the repository at this point in the history
  • Loading branch information
mrclay committed Feb 4, 2014
1 parent b4b8606 commit 30839ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions MIN.txt
Expand Up @@ -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.:
Expand Down
2 changes: 1 addition & 1 deletion min/index.php
Expand Up @@ -60,7 +60,7 @@
}

// 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'])) {
Expand Down

0 comments on commit 30839ab

Please sign in to comment.