Minify Example 1 : Groups controller + Far-off Expires header
-
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.
-
-
-
+
-
- $content
- ,'id' => __FILE__
- ,'lastModifiedTime' => filemtime(__FILE__)
-
- // also minify the CSS/JS inside the HTML
- ,'minifyAll' => true
-));
\ No newline at end of file
+