|
UserGuide
Your friendly guide to installing and using Minify.
If this page doesn't help, please post a question on our Google group. Installing Minify for the first timeDownload the latest Minify and unzip the files to a new "minify" directory. Copy the "min" folder directly into your DOCUMENT_ROOT. Done! (Optional) See TestingMinify if you'd like to run unit tests. 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). |
Sign in to add a comment
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 }how to call this peice of code Which url i should give?
"if (isset($include_script_groups$param1?)) {
} else { }"When i try http://localhost/php/min.php?param1=scripts/script.js it says HTTP/1.0 400 Bad Request
though its working fine for the groups if i make grouping in php only. But what i want is i want to minify all the files in the parameter i pass.
if (isset($include_script_groups[$_GET['param1']])) { ...
Hi all. Ummm... a small suggestion:
I have Minify located in a static server and I used rewrite rules to serve false phisical files, stored through automatically merging arrays. This can output several 404 errors, especially serving groups, and I decided use the Quiet mode to check this.
I think can be useful (in quiet mode) a few more data, in the options array wich are returned from Base Controller when happen a error, think you?
I.Ex. and above all: a simple list of files that aren't found, or causes errors, instead the content item or another extra item.
'success' => boolean false 'statusCode' => int 400 'content' => string ( true === debug ) ? list_of_wrong_files : Public error message (length=0) 'headers' => array emptyCheers and congrats, I like your work.
Can anyone here help Zend framework users to set this up. Thanks in advance.
@covifox: In config.php set $min_errorLogger = true; and check the HTTP headers in 400 responses (or check FirePHP) for errors.
Thanks for response and sorry by delay. I don't want know if have errors after output; I want know errors before output, for application (and my own automatic logger) not for me.
But this already don't matter. Thanks ;)