Development

Changeset 10175

You must first sign up to be able to contribute.

Changeset 10175

Show
Ignore:
Timestamp:
07/07/08 19:17:37 (2 months ago)
Author:
KRavEN
Message:

Changes to the docs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfCombineFilterPlugin/branches/kraven/README

    r10090 r10175  
    33The `sfCombineFilter` is an implementation of the [http://rakaz.nl/extra/code/combine CSS and Javascript Combiner] by Niels Leenheer. It makes your pages load faster by combining and compressing javascript and css files. 
    44 
    5 This filter provides means to automatically combine your included javascripts and stylesheets into one request each. All of the included files are combined into a single large file and compressed using gzip. The resulting file is cached and used every time that particular combination of files is used, until any of the files are changed at which point a new cache is automatically created. 
     5This filter provides means to automatically combine your included javascripts and stylesheets into one request each. All of the included files are combined into a single large file.  Compression is determined by the "compressed" setting in settings.yml The resulting file is cached and used every time that particular combination of files is used.  If any of the files are changed a new cache is automatically created. 
    66 
    7 The symfony filter looks at all of the javascripts and stylesheets resources specified in the current response, and automatically creates a string that combines all of the names together. When your visitors request this special file, they will get one large file, gzipped and ready to go
     7The symfony filter looks at all of the javascripts and stylesheets resources specified in the current response, and automatically creates a string that combines all of the names together. When your visitors request this special file, they will get one large file
    88 
    99For example, if you are including the following javascripts on every page: 
     
    1414 * /js/slider.js 
    1515 
    16 Using the combine script, you can combine all of these files into a single file by changing the URL to 
    17  * /js/packed/prototype.js,builder.js,effects.js,dragdrop.js,slider.js 
    18  
    19 The sfCombineFilter will do this automatically. Then, with the help of .htaccess and the included combine.php file in the /web folder, this request is routed to combine.php which uses the string of file names to either locate an existing cached file of the concatenated and compressed source or create a new one. 
     16Using the combine script, you can combine all of these files into a single packed.js file 
    2017 
    2118== Features == 
    2219 
    2320 * Support for automatic combination of javascript, css, or both 
    24  * Support for script exclusions based on file path (mainly used when css relies on a particular path to load images) 
     21 * Support for script exclusions (mainly for scripts that are incompatible with being packed like tiny_mce) 
     22 * Automatically replaces relative paths in css files with actual paths 
     23 * Support for css filtered paths for additional paths that need to be removed from the file path before replacing relative paths 
    2524 * Cache that refreshes automatically when source files are changed 
     25 * Option to minimize the packed.js with JSMin 
     26 * Option to safe minimize the css 
     27 * Options to only pack/compress the javascript or css in /packed/js or /packed/css 
     28 * Filter utilizes client side caching to send 403 for unchanged cache files 
    2629 
    2730== Installation == 
     
    3639=== Enable the filter === 
    3740 
    38  * In your app/config/filters.yml, add the sfCombineFilter. This must come AFTER "common": 
     41 * In app/config/filters.yml, add the sfCombineFilter. This must come AFTER "common": 
    3942 
    4043{{{ 
     
    5053sfCombineFilter: 
    5154  class:   sfCombineFilter 
    52   param: 
    53     javascripts:    true 
    54     stylesheets:    true 
    55     compress_js:    true 
    56     compress_css:   true 
    57     root_js_only:   false 
    58     root_css_only:  true 
     55 
    5956flash:     ~ 
    6057execution: ~ 
    6158}}} 
    6259 
    63  * In your app/config/routing.yml 
     60 * In app/config/routing.yml 
    6461{{{ 
    6562download_packed_files: 
     
    6865}}} 
    6966 
    70  * In your app/config/settings.yml 
     67 * In app/config/settings.yml 
    7168 
    7269add sfCombineFilter to enabled_modules: [] 
    7370 
    74 By default all javascripts and stylesheets requested in /packed/js/ or /packed/css/ respectively are combined into one request each, whereas files requested outside of that path are ignored. You can turn off the filter all together for javascript or css by setting those parameters to "false". If you want to include files requested from any path and not just those inside /js or /css, then set the parameters "root_js_only" and "root_css_only" to false. 
     71All settings are made in application/config/app.yml.  See plugins/sfCombineFilterPlugin/config/app.yml for defaults and examples.  You can turn off the filter all together for javascript or css by setting those parameters to "false".  You can turn compression on or off by setting compress_js or compress_css.  You can combine only the files in /packed/js and /packed/css by setting root_js_only and root_css_only to true. 
     72 
     73== Known Issues == 
     74 
     75Internet Explorer 6 has problems with large javascript files when gzip compression is on.  If you experience strange issues with your pages in IE6, set compressed: off for you environment in settings.yml and it should resolve the problem 
    7576 
    7677== Changelog ==