MagicMin Version 3 Available!
Along with better directory path support for windows machines, V3 includes the ability to output merged/minified files with unique hashed filenames for better caching support decreases your performance rating).
Unique generated filenames are also considerably more reliable when it comes to ensuring your visitors always have the most current content, as each time a new minified or merged file is generated- so is a new filename for the file!
require_once( 'class.magic-min.php' ); //Use google closure API, gzip the resulting file, and hash filenames $minified = new Minifier( array( 'gzip' => true, 'closure' => true, 'hashed_filenames' => true ) );
So whereas previously, your source code would’ve looked something like…
<link rel='stylesheet' href='http://yoursite.com/styles.css?v=1.2.1' type='text/css' />
Now they’ll look like…
<link rel='stylesheet' href='http://yoursite.com/d268f0e1f49d63aa24d87004673ec6e05855deb1.css' type='text/css' />
And (if and) when the minified file is regenerated to merge in changes, the filename will be freshly generated and would be something similar to…
<link rel='stylesheet' href='http://yoursite.com/c195919e63da89bba8bc7d80df64873609681732.css' type='text/css' />
100%. If you’ve already been using MagicMin, the updates will never break what you already have (because I use it too!)
|download: MagicMin V3 (122.83KB)|
2 Comments + Add Comment
Leave a comment
- MySQL : Query WordPress Database for Invalid Media Filenames
- PHP : Get Actual IP Address with PHP
- PHP : Clean sanitized database contents on output
- htaccess : Force www. prefix in URIs
- PHP : Force File Download with Correct Content Type
- Wordpress : Disable upgrade notification
- htaccess : Codeigniter Access to JS and CSS Files