diff --git a/web/examples/1/_groupsSources.php b/web/examples/1/_groupsSources.php new file mode 100644 index 0000000..7ab4c94 --- /dev/null +++ b/web/examples/1/_groupsSources.php @@ -0,0 +1,11 @@ + array( + "{$base}/jquery-1.2.3.js" + ,"{$base}/test space.js" + ) + ,'css' => array("{$base}/test.css") +); +unset($base); \ No newline at end of file diff --git a/web/examples/1/index.php b/web/examples/1/index.php index 804d7e5..e3ba2fe 100644 --- a/web/examples/1/index.php +++ b/web/examples/1/index.php @@ -1,19 +1,18 @@
config.php
. Notice that minifying jQuery takes several seconds!.
-This is an example of Minify serving a directory of single css/js files. -Each file is minified and sent with HTTP encoding (browser-permitting).
+In this example, we use a single config file _groupsSources.php
+to specify files for minification. During HTML generation,
+Minify_Build
is used
+to stamp the latest modification times onto the minify URLs. Our minify server,
+m.php
, then sends the content with far-off Expires headers.
In this example, if m.php detects $_GET['v'], a 30-day Expires header is -sent rather than the conditional GET.
+If one of our sources is modified, its URL (particularly the query string) is +changed in the HTML document, causing the browser to request a new version.
+Link to this page (F5 can trigger no-cache headers)
+Reload page (F5 can trigger no-cache headers)
- - - + - - $content - ,'id' => __FILE__ - ,'lastModifiedTime' => filemtime(__FILE__) - - // also minify the CSS/JS inside the HTML - ,'minifyAll' => true -)); \ No newline at end of file +