|
UserGuide
If this page doesn't help, please post a question on our Google group. Installing Minify for the first time
If you place "min" in a subdirectory (e.g. http://example.com/mySite/min/), you should read and follow the instructions at AlternateFileLayouts carefully, or CSS URI rewriting will not work. Also in a subdirectory the BuilderApp will not function properly, but it's not necessary for Minify's functionality. Done! (Optional) See TestingMinify if you'd like to run unit tests. Hosting on LighttpdMinify comes with Apache mod_rewrite rules, but this does the same for Lighttpd: url.rewrite-once = ( "^/min/([a-z]=.*)" => "/min/index.php?$1" ) Upgrading Minify from 2.1.xSee the Upgrade Guide UsageBrowse to http://example.com/min/ The Minify URI Builder will help you create URIs you can use to minify existing files on your site. You can see screenshots and get a feel for this process from this walkthrough on mrclay.org Browse to http://example.com/min/README.txt for more complete documentation. Configurationmin/config.php holds general config options. min/groupsConfig.php holds preset groups of files to minify. (The builder application can help with this). CookBook shows how to customize settings between production/development environments, and between groups. CustomSource shows how to set some file/source-specific options, or serve content from a PHP script or URL. Problems?See CommonProblems and Debugging. You might also try TestingMinify (running test_environment.php in particular). |
hi guys, i have configured the minify to work in my server .. my question is how to i check whether the files are caching or not ...
any suggestions ...
I suggest you always set $min_cachePath in /min/config.php. That way you know where the files are stored and can check them. Without that set, they may be in /tmp or several other directories depending on your OS.
Using .htaccess and RewriteRule? for Minify
I used the following within .htaccess to minify all .js and .css on my WordPress? MU site:
I found this works great as I used this method in minify v1.0 but appears to break css background images.
/*wp-content/themes/mytheme/style.css*/ #someid { background: #6E6A66 url('pics/mygif.gif') repeat-x top; }This is fixed by using a previous mentioned option within config.php and switching the css URI rewrite option off.
I hope this helps anyone attempting to do the same.
I am interested in a way to explicitly reference a group name to serve programatically, not pulling from the querystring. I have a self-built MVC framework, and have put the following code in a a method for one of my controllers
(From my <Controller_Proxy> class)
public function serve(){ Minify::setCache(); Minify::serve('Groups', array('groups' => $include_script_groups, 'maxAge' => 31536000)); }as mentioned in the userguide, but my URL pattern (already using mod_rewrite) is
I would like to pass something like
but would like to know an option to pass to tell Minify to serve the 'core_css' group.
@jasondaly: It looks like you want the "Files" controller. Instead of selecting a key based on PATH_INFO (what Groups does), you just give it the piece of the array you want:
if (isset($include_script_groups[$param1])) { Minify::serve('Files', array('maxAge' => 31536000, 'files' => $include_script_groups[$param1])); } else { // 404 }if (isset($include_script_groups[$_GET['param1']])) { ...
Please use the Google group for support questions.
Nice post thanks for sharing with us. I think we all should appreciate the efforts of the owner of this blog and the writer of this article as well.
How to make sure the $min_cachePath was set correctly? I find that even I set a invalid path, the program still works.