├── README.textile ├── booster ├── .gitignore ├── .htaccess ├── booster.css_lazyload.js ├── booster.css_lazyload.min.js ├── booster_cache │ └── empty ├── booster_css.php ├── booster_css_ie.php ├── booster_inc.php ├── booster_js.php ├── booster_mhtml.php ├── compiler │ ├── COPYING │ ├── README │ └── compiler.jar ├── htaccess │ └── .htaccess ├── jsmin │ └── jsmin.php ├── wp_booster.php └── yuicompressor │ └── yuicompressor-2.4.2.jar ├── examples └── example1 │ ├── .htaccess │ ├── css │ └── style.css │ ├── images │ ├── 24hours.gif │ ├── arrow1.gif │ ├── arrow2.gif │ ├── blank.gif │ ├── button.gif │ ├── commentbg.gif │ ├── company-bg.gif │ ├── footerbg.gif │ ├── footerlogo.gif │ ├── form-bottombg.gif │ ├── formbg.gif │ ├── header.jpg │ ├── icon.gif │ ├── icon1.gif │ ├── icon2-hover.gif │ ├── icon2-normal.gif │ ├── icon3-hover.gif │ ├── icon3-normal.gif │ ├── logo.jpg │ ├── mainbg.gif │ ├── menu-div.gif │ ├── new-registerbg.gif │ ├── not-memberbg.gif │ ├── reedmore-bg.gif │ ├── reedmore-hover.gif │ ├── rightmenu.gif │ ├── rightsidebg.jpg │ ├── servicesbody-bg.gif │ ├── servicestop-bg.gif │ ├── topleftmenu-hover.gif │ └── topmenubg.gif │ ├── index_fast.php │ ├── index_slow.php │ ├── js │ ├── 01_jquery-1.3.1.min.js │ ├── 02_cufon-yui.js │ ├── 03_Sansation_400.font.js │ ├── Sansation license.txt │ ├── cufon license.txt │ ├── jQuery license.txt │ └── z_functions.js │ ├── license.txt │ └── subfolder │ └── index_fast.php ├── htaccess └── .htaccess └── license.txt /README.textile: -------------------------------------------------------------------------------- 1 | h1. CSS-JS-Booster 2 | 3 | !http://www.der-schepp.de/css-js-booster-github.jpg! 4 | 5 | Copyright (C) 2010 Christian "Schepp" Schaefer 6 | "http://twitter.com/derSchepp":http://twitter.com/derSchepp 7 | 8 | h1. Functionality and Benefits 9 | 10 | CSS-JS-Booster is a PHP-script that tries to automate as many performance 11 | optimizing steps related to CSS and JS embedding as possible. 12 | 13 | For CSS these steps are: 14 | * combine multiple CSS-files resulting in number of HTTP-requests going down 15 | * minify CSS 16 | * Embed any CSS-images smaller 24KB as data-URI or MHTML (for IE <= 7) 17 | * Split the output back into 2 even files that can load in parallel (not for WP) 18 | * GZIP-compress the resulting CSS 19 | * Have browsers cache the result as long as it remains unchanged 20 | * If IE6: Issue a JS-command to fix background image caching behaviour 21 | 22 | For JS these steps are: 23 | * combine multiple JS-files resulting in number of HTTP-requests going down 24 | * Minify the JS through the Google Closure Compiler Webservice, or JSMin as fallback (not for WP) 25 | * GZIP-compress the resulting JS 26 | * Have browsers cache the result as long as it remains unchanged 27 | 28 | + GZIP-compresses the page calling those files. 29 | 30 | Depending on the amount of CSS, CSS-images and JS, this can significantly 31 | increase loading speed of your site. 32 | 33 | 34 | 35 | Naah, your software stinks! Alternatives? Yes, there are! 36 | 37 | Quite similar to this library is one called "SmartOptimizer":http://farhadi.ir/works/smartoptimizer 38 | with the major difference that it neither supports MHTML for the older IEs 39 | nor does it offer the possibility to back-split the output into multiple 40 | parts. 41 | 42 | Then there is another nifty piece of software called "Web Optimizer":http://www.web-optimizer.us/ 43 | that does what CSS-JS-Booster does, and a little lot more. 44 | And there are many CMS-Plugins available. There exists a free and 45 | a commercial version. 46 | 47 | For any full-fledged web 3.0 company with money, their own servers and some 48 | technical skills (or instead: even more money), there also exists an 49 | enterprise-website-accelerator named "aptimize":http://www.aptimize.com/ 50 | 51 | Just to have mentioned those... 52 | 53 | 54 | 55 | h1. System Requirements 56 | 57 | CSS-JS-Booster absolutely requires PHP 5. No PHP 4, sorry... 58 | Version-wise it is tested up until PHP 5.3. 59 | 60 | 61 | 62 | h1. Basic Usage 63 | 64 | CSS-JS-Booster is a standalone-library as well as a Wordpress-plugin. 65 | If you are interested in the Wordpress-part, you can skip all of this and 66 | scroll further down to where you will find a Wordpress install guide. 67 | 68 | Now, coming to the standalone-library... 69 | 70 | CSS-JS-Booster is - as its name implies - divided into two function blocks: 71 | A CSS-optimizing block and a JavaScript-optimizing block. 72 | 73 | For both functionalities you first need to go into the booster-folder and 74 | create a folder named *booster_cache* and have it CHMOD 0777. 75 | 76 | Afterwards include 77 | 78 | bc. 82 | 83 | at the top of your (PHP-interpreted) file. 84 | (Adjust the path according to your folder-structure) 85 | 86 | Should you happen to only have static HTML-files, try enabling PHP-parsing 87 | by putting a *.htaccess*-file into the site's root with following directive: 88 | 89 | bc. AddType application/x-httpd-php .html .htm 90 | 91 | 92 | 93 | For the CSS-part, put all releveant CSS-files into a subfolder *css* of your 94 | site. Make sure, all declarations pointing to image-files have their paths 95 | adjusted (i.e. all CSS should be fully functional by themselves inside that 96 | folder). 97 | 98 | If you have multiple CSS-files rename them so that they are alphabetically 99 | sorted in the desired order, e.g.: 100 | 101 | *01_first.css 102 | 02_second.css 103 | 03_third.css* 104 | 105 | Then add this declaration in the HTML's head-section: 106 | 107 | bc. css_source = '../css'; //relative path from inside booster folder 109 | echo $booster->css_markup(); 110 | ?> 111 | 112 | for example: 113 | 114 | bc.
115 |