Upgrade to Pro — share decks privately, control downloads, hide ads and more …

webo.site.speedup.userguide.en.pdf

Avatar for cueland cueland
October 28, 2011
140

 webo.site.speedup.userguide.en.pdf

Avatar for cueland

cueland

October 28, 2011

Transcript

  1. Table Of Contents 1. Introduction................................................................ 4 What is WEBO Site

    Speedup? ......................................... 5 Version Comparison .................................................... 7 System Requirements.................................................. 8 2. Installing and Updating .............................................. 10 Standalone installation .............................................. 11 Installing Bitrix plugin ............................................... 14 Installing CS-Cart plugin ............................................. 16 Installing Drupal plugin .............................................. 19 Installing Joomla! plugin ............................................ 21 Installing Magento plugin............................................ 28 Installing NetCat plugin.............................................. 31 Installing WordPress plugin ......................................... 34 3. Using WEBO Site SpeedUp .......................................... 36 Control Panel .......................................................... 38 Options.................................................................. 41 System Status.......................................................... 55 Personal Data.......................................................... 58 4. Understanding WEBO Site Speedup ............................. 59 Integration with website ............................................ 60 Optimization algorithm.............................................. 68 CSS Sprites Overview ................................................ 71 Plugins API ............................................................. 73 System Files............................................................ 75 Configuration Algorithm............................................. 78 Unobtrusive Patterns ................................................ 83 2
  2. 5. Troubleshooting and Support ..................................... 86 Installing issues........................................................ 87 Client-side

    issues ..................................................... 90 Server-side issues..................................................... 95 Technical support .................................................... 98 3 Visit our site www.webogroup.com
  3. 1. Introduction This documentation will guide you through installation and

    configuration of WEBO Site SpeedUp. It will also help you to better understand all optimization techniques applied by WEBO Site SpeedUp. 4
  4. 1.1. What is WEBO Site SpeedUp? WEBO Site SpeedUp is

    a web application that automates all client-side improvements for website and significantly increases load speed of its pages. Time- proven open source solutions and engineer genius brought together all parts of this puzzle and now you can improve your website in a few simple steps. Optimization actions • Merging external and inline code • Minifying files • Gzipping files • Client-side caching • Server-side caching • Multiple hosts for static assets • CSS Sprites applying • Data:URI applying • Unobtrusive JavaScript loading • and much more... Minimum server-side performance impact When cache files are created WEBO Site SpeedUp wastes about 1-5 ms to parse and refresh outputted HTML document (with default settings, correct one-string mode for HTML is a very expensive procedure and can take 50-100 ms additionally). Acceleration statistics After series of tests on default CMS installations WEBO Site SpeedUp showed average page loading speed of 250% of normal (and up to 500% in several cases). To be accurate, average acceleration is 2.5 times (+21 in YSlow grade, -34% in size, -43% in objects). Table below shows how greater website speed increases after WEBO Site SpeedUp installation. Note that all CMS are tested in one particular environment with ~100KB/s broadband and Firefox 3.5 browser. Websites are loaded several times to fill proxy cache and to get necessary statistics. Local cache is emptied before each load. 5 Visit our site www.webogroup.com
  5. CMS YSlow Load time (s) Size (KB) Objects Before After

    Before After Before After Before After Bitrix 8.5.1 61 92 4.37 2.21 239 194 53 28 CMS Made Simple 74 96 0.483 0.375 49 35 15 5 cogear 1.0 76 91 5.11 1.57 447 129 11 9 DataLife Engine 8.0 65 91 4.48 1.29 147 120 43 16 Drupal 6.10 72 94 4.8 1.34 102 99 32 8 Etomite 1.1 89 96 0.874 0.477 19 14 7 6 ExpressionEngine 1.6.8 96 99 0.584 0.257 10 4 3 2 IPB 2.3.6 67 89 4.38 1.81 124 52 27 25 Joomla! 1.0.15 78 92 0.996 0.521 47 39 18 13 Joomla! 1.5.10 64 94 4.38 1.57 139 73 42 9 Joostina 1.2 63 91 8.07 3.77 426 333 45 17 Livestreet 0.3.1 51 96 10.87 1.97 298 111 48 5 MaxDev Pro 1.082 75 93 2.4 0.871 51 36 27 21 MaxSite 0.3.1 71 97 2.73 1.12 152 90 15 5 MODx 0.9.6.3 69 97 2.73 0.842 109 51 18 4 OpenSlaed 1.2 77 83 5.51 3.37 257 250 92 72 osCommerce 2.2 77 93 3.05 1.24 72 65 31 31 PHP-Nuke 8.0 * 72 91 2.785 1.272 181 91 19 19 phpBB 3.0.4 72 95 0.651 0.305 85 71 19 7 SMF 1.1.8 ** 61 91 2.68 1.72 183 132 63 25 Textpattern 4.0.8 92 97 1.26 0.823 8 5 4 4 UMI.CMS 2.7 58 93 4.52 2.89 269 177 59 10 vBulletin 3.8.3 70 92 3.33 1.81 124 67 20 14 Website Baker 2.6 77 95 1.51 0.47 17 12 10 8 WordPress 2.7.1 72 95 4.58 2.08 133 125 31 6 Xaraya 1.1.5 81 97 1.79 0.78 35 16 8 4 XOOPS 2.3.3 72 95 3.22 1.53 65 50 21 8 * for PHP-Nuke the second static host has been added ** for SMF 2 additional static hosts have been added 6
  6. 1.2. Version Comparison WEBO Site SpeedUp exists in three versions:

    Free, Standard and Extended Editions. Table below describes differences between these versions. Features Free Edition Standard Edition Extended Edition First view and repeat view speedup up to 200% up to 300% up to 500% and even more Server load reduction available available Basic speedup features available available available Advanced speedup features available available CDN integration Partly Partly Complete Advanced SEO compatibility available Guaranteed speedup available Installation and configuration available Speedup report available Free updates available available available Technical support 2 weeks of e-mail support 12 months of full support Price Free $89.99 Available only with Website SpeedUp 7 Visit our site www.webogroup.com
  7. 1.3. System Requirements Server requirements • PHP 4.3+ or PHP

    5+ • Apache or nginx or IIS server with mod_php, or Denwer, or any other server with CGI • 16 MB memory available (64+ MB is desirable for correct CSS Sprites creation) • Optional: curl library enabled (for external files' fetching) • Optional: zlib library enabled (for gzip via PHP possibility) • Optional: gd library enabled (for CSS Sprites) Supported browsers • IE 5+ • Firefox 2+ • Safari 2+ • Chrome • Opera 7+ Supported Systems WEBO Site SpeedUp can be installed on any system that meets requirements above, but it also has built-in compatibility with the following systems: • 4images • Bitrix 8.5+ via native plugin • CakePHP 1.2.3+ • CMS Made Simple 1.6+ • CodeIgniter 1.7+ • cogear 1.0+ • CS-Cart via native plugin • DataLife Engine 7.5+ • Drupal 5.x via native plugin • Drupal 6.x via native plugin • Drupal 7.x via native plugin • Etomite 1.1+ • ExpressionEngine 1.6.8+ • Geeklog 1.6+ • Invision Power Board 2.3.6+ • Joomla! 1.0.x • Joomla! 1.5.x via native plugin • Joostina 1.2+ • Kohana 2.3+ • Koobi CMS 8
  8. • LiveStreet 0.2+ • Magento 1.2+ • Magento 1.4+ via

    native plugin • MaxDev Pro 1.082+ • MaxSite 0.3+ • MODx 0.9+ • NetCat • NetCat 4.0+ via native plugin • Open Slaed 1.2+ • osCommerce 2.2+ • phpBB 3.0+ • PHP Fusion 7.0.5+ • PHP-Nuke 8.0+ • PrestaShop 1.2.5+ • Santafox 1.1+ • Simpla • Simple Machines Forum 1.1.8+ • SocialEngine • Symfony 1.2+ • Textpattern 4.0+ • Typo3 4.2+ • VaM Shop 1.5.5+ • vBulletin 3.8.3+ • UMI.CMS 2.7+ • WebAsyst • Website Baker 2.8+ • WordPress 2.6+ via native plugin • X-Cart • Xaraya 1.15+ • XOOPS 2.3.3+ • Yii 1.0+ • Zend Framework (with disabled rewrite for WEBO Site SpeedUp) Note: WEBO Site SpeedUp doesn’t work with websites encoded with Zend and not supported via native plugin. 9 Visit our site www.webogroup.com
  9. 2. Installing and Updating Installing WEBO Site SpeedUp WEBO Site

    SpeedUp can be easily installed on any website that meets the system requirements. Basically, it can be any website with PHP available. There are two different ways of installation: • Standalone installation. This is the universal way for all websites that meets the system requirements, even for those with native plugin support. • Plugin installation. WEBO Site SpeedUp can be installed as a native plugin for WordPress, Joomla!, CS-Cart, Drupal and Bitrix. Plugin installation means more integration and thus extra optimization performance along with the native system interface for WEBO Site SpeedUp management. Depending on which way you want WEBO Site SpeedUp to be installed on your CMS there are detailed step-by-step instructions: • Standalone installation • Bitrix plugin installation • CS-Cart plugin installation • Drupal plugin installation • Joomla! plugin installation • Magento plugin installation • NetCat plugin installation • WordPress plugin installation The latest version of the software can be obtained on WEBO Site SpeedUp download page. Updating WEBO Site SpeedUp WEBO Site SpeedUp indicates when the new version is available and displays its changes log. This information is shown on Updates block on the dashboard of Control Panel page and on the Updates tab of System Status page in WEBO Site SpeedUp interface. If you choose to update WEBO Site SpeedUp, in single click it will automatically download and update all files preserving your current configuration. Also if WEBO Site SpeedUp is installed as a plugin, all native plugin update ways are also supported. 10
  10. 2.1. Standalone installation Important notes • If you are using

    PHP Speedy or Web Optimizer plugins (or their standalone versions), deactivate or delete them before WEBO Site SpeedUp installation. They are not compatible with WEBO Site SpeedUp. • If you are using any other performance-related software, consider disabling it during installing and testing of WEBO Site SpeedUp as there is a possibility that such software will affect WEBO Site SpeedUp operation. And note that WEBO Site SpeedUp integrates and totally exceeds functionality of the most of such software. Just check out the WEBO Site SpeedUp feature list. • If you will experience any problems during installation, please refer to Troubleshooting and Support section. Installing 1. Download from the official site latest version of the WEBO Site SpeedUp core package and extract it to your website root. This package is about 1 Mb in size and its file name is like webo.site.speedup.vX.X.X.zip where X are version numbers. ◦ If you have SSH access to the website, just run these simple commands: wget -P /your-website-root/ http://web- optimizator.googlecode.com/files/ webo.site.speedup.vx.x.x.zip unzip /your-website-root/webo.site.speedup.vx.x.x.zip ◦ If you have FTP access to the website, just unzip downloaded core package, and upload it to the website root using any available FTP client (WinSCP or FileZilla or any other). 2. You should have the following structure in /your-website-root/web-optimizer/ directory: /cache/ /controller/ /view/ ... index.php readme.txt 3. Make /web-optimizer/ directory completely writable including all its files and subdirectories (or at least make sure that config.webo.php file and /cache/ directory are writable). This is required for normal application operation. 4. Open in your browser the URL: http://your-website/web-optimizer/index.php. 11 Visit our site www.webogroup.com
  11. 5. Enter the password, e-mail and in case you have

    purchased either Lite Edition or Premium Edition of WEBO Site SpeedUp, a valid license key. 6. Click Install button. WEBO Site SpeedUp will analyze the system environment, setup the initial configuration and will backup and change required files (index.php and .htaccess files usually). It should take just a few seconds. 7. If your system is not in supported systems list, locate every file which outputs a webpage (index.php and/or several other .php files usually). Each file should have several additional strings in very beginning and very end, according to this: <?php require('/your-website-root/web-optimizer/ web.optimizer.php'); ?> ... former contents of the file ... <?php $web_optimizer->finish(); ?> 8. Installation is complete. The Control Panel page of WEBO Site SpeedUp will be shown up. Now you can start working with this plugin or refer to getting started section to learn WEBO Site SpeedUp basics. 12
  12. 2.2. Installing Bitrix module Important notes • If you will

    experience any problems during installation, please refer to Troubleshooting and Support section. • If you are using PHP Speedy or Web Optimizer modules (or their standalone versions), deactivate or delete them before WEBO Site SpeedUp installation. They are not compatible with WEBO Site SpeedUp. • If you are using any other Bitrix performance-related modules, consider disabling them during installing and testing of WEBO Site SpeedUp. Such modules may affect WEBO Site SpeedUp operation. And note that WEBO Site SpeedUp integrates and totally exceeds functionality of many such modules. Just check out the WEBO Site SpeedUp features list. • WEBO Site SpeedUp is not operational when you are logged in under admin account. To ensure that WEBO Site SpeedUp works properly, please, log off, use another browser or use debug mode of WEBO Site SpeedUp. • After successful installation please refer to getting started section. Installing 1. Download from the official site the latest version of the package WEBO Site SpeedUp for Bitrix that should look like webo.site.speedup.vx.x.x.bitrix.zip (where X are version numbers). Package file should be few Kb in size. 2. Extract this package to the /bitrix/modules/webo.optimizer/ directory of Bitrix installation to have the following structure there: /admin/ /install/ /lang/ include.php LICENSE.txt options.php readme.txt 3. In Bitrix admin panel open Control Panel → Settings → Modules then check Install button near WEBO Site SpeedUp module. WEBO Site SpeedUp will download its core package from repository, analyze the system environment and setup the initial configuration. Please do not take any actions while this process is on. It should take about one minute. 14
  13. 4. In case auto installer is unable to download WEBO

    Site SpeedUp core package, download it manually from the official site. Its name should be like webo.site.speedup.vx.x.x.zip and its size should be about 1 Mb. Extract this core package to the directory /bitrix/components/webo/optimizer/. The structure in that directory should be as the following: /cache/ /controller/ ... config.webo.php index.php install.php ... 5. Make /bitrix/cache/ directory completely writable including all its files and subdirectories and also make sure that .htaccess file in your website root is writable too or that this file can be created if it not yet exists (in this case website root directory should be writable). This is required for normal module operation. 6. Open Control Panel → Settings → Modules Settings → WEBO Site SpeedUp to get to the WEBO Site SpeedUp configuration interface. 7. Installation is complete. Now you can refer to getting started section. 15 Visit our site www.webogroup.com
  14. 2.3. Installing CS-Cart plugin Important notes • If you will

    experience any problems during installation, please refer to Troubleshooting and Support section. • If you are using any CS-Cart performance-related plugins, consider disabling them during installing and testing of WEBO Site SpeedUp. Such plugins may affect WEBO Site SpeedUp operation. And note that WEBO Site SpeedUp integrates and totally exceeds functionality of many such plugins. Just check out the WEBO Site SpeedUp feature list. • After successful installation please refer to getting started section. Installing 1. Download from the official site the latest version of the package WEBO Site SpeedUp for CS-Cart that should look like webo.site.speedup.vx.x.x.cscart.zip (where X are version numbers). Package file should be a few kilobytes in size. 2. Extract this package to the /addons/ directory of CS-Cart installation to have the webositespeedup directory with following structure there: /controllers/ /schemas/ addon.xml func.php init.php LICENSE.txt readme.txt 3. Make sure that /addons/webositespeedup/ directory is writable including all its files and subdirectories. 4. Make sure that /skins/your_admin_panel_skin/admin/addons/ directory is writable. 5. In CS-Cart admin panel open Administration → Addons then find WEBO Site SpeedUp plugin and click Install link to the right. CS-cart will register the plugin. 6. On the same page change status for WEBO Site SpeedUp plugin from Disabled 16
  15. to Active. WEBO Site SpeedUp will download its core package

    from repository, analyze the system environment and setup the initial configuration. Please do not take any actions while this process is on. It should take about one minute. 7. Installation is complete. In CS-Cart admin panel click Administration → WEBO Site SpeedUp to get to the plugin interface. Now you can refer to getting started section. Troubleshooting Error message Page Not Found on the WEBO Site SpeedUp administration page This happens when WEBO Site SpeedUp files are absent in /skins/basic/admin/ addons/webositespeedup/ directory. Please make sure that /skins/basic/ admin/addons/ directory is writable (replace basic to your specific admin skin name if you are not using the default). Then try to reinstall WEBO Site SpeedUp from the Addons page. Error message There is a critical issue on the WEBO Site SpeedUp administration page This problem takes place when one of your server security modules like suPHP is forcing 500 error for WEBO interface's requests to the server. To avoid the problem, try to set rights to 755 and 644 for all the directories and files respectively under the /addons/webositespeedup/ directory, including the directory itself. If that won't work, try to trace the exact error messages for the WEBO Site SpeedUp dynamic requests. For this you can use a tool like Console tab of Firebug addon for Firefox. Addon is activated but is not listed in the Administration menu There are probably server cache which prevents the menu change so try to clear this cache. You have two options: 17 Visit our site www.webogroup.com
  16. • Open the http://domain.com/cs-cart-admin.php?cc (replace domain.com and cs-cart-admin.php to your

    domain and admin filename respectively) • Delete all files from the /var/cache/ directory 18
  17. 2.4. Installing Drupal plugin Important notes • If you will

    experience any problems during installation, please refer to Troubleshooting and Support section. • If you are using PHP Speedy or Web Optimizer plugins (or their standalone versions), deactivate or delete them before WEBO Site SpeedUp installation. They are not compatible with WEBO Site SpeedUp. • If you are using any other Drupal performance-related plugins, consider disabling them during installing and testing of WEBO Site SpeedUp. Such plugins may affect WEBO Site SpeedUp operation. And note that WEBO Site SpeedUp integrates and totally exceeds functionality of many such plugins. Just check out the WEBO Site SpeedUp feature list. • To get the best of gzip compression please disable gzip in Drupal global settings. WEBO Site SpeedUp has better gzip support. • After successful installation please refer to getting started section. Installing 1. Download from the official site the latest version of the package WEBO Site SpeedUp for Drupal that should look like webo.site.speedup.vx.x.x.drupalx.zip (where X are version numbers). Package file should be few Kb in size. 2. Extract this package to the /sites/all/modules/weboptimizer/ directory of Drupal installation to have the following structure there: INSTALL.txt LICENSE.txt README.txt weboptimizer.info weboptimizer.module 3. Make directory /sites/all/modules/weboptimizer/ writable for your web server (or for all users) - WEBO Site SpeedUp will install here core package automatically. 4. In Drupal admin panel open Administer → Site building → Modules then check Enabled box near WEBO Site SpeedUp moudle and click Save configuration button. WEBO Site SpeedUp will download its core package from repository, analyze the system environment and setup the initial configuration. Please do not take any actions while this process is on. It should take about one minute and then the success message will be shown up. 19 Visit our site www.webogroup.com
  18. 5. In case auto installer is unable to download WEBO

    Site SpeedUp core package, download it manually from the official site. Its name should be like webo.site.speedup.vx.x.x.zip and its size should be about 1 Mb. Extract this core package to the same directory /sites/all/modules/ weboptimizer/. The structure now should be as the following: /web-optimizer/ |__/cache/ |__/controller/ |__ ... INSTALL.txt LICENSE.txt README.txt weboptimizer.info weboptimizer.module 6. Make /web-optimizer/ directory completely writable including all its files and subdirectories or at least make sure that config.webo.php file and /cache/ directory are writable. This is required for normal plugin operation. 7. Open Administer → Site configuration → WEBO Site SpeedUp to get to the WEBO Site SpeedUp configuration interface. 8. Installation is complete. Now you can refer to getting started section. 20
  19. 2.5. Installing Joomla! plugin Important notes • Before installing, if

    you are using PHP Speedy or Web Optimizer or any other performance-related solutions, consider disabling them or deleting them. These solutions may affect WEBO Site SpeedUp operation. And note that WEBO Site SpeedUp integrates and totally exceeds functionality of the most of them. Just check out the WEBO Site SpeedUp feature list. • If you will experience any problems during installation, please check for possible solution at the Troubleshooting section of this article or refer to global Troubleshooting and Support section. Installing Joomla! 1.5.x+ plugin 1. Open official site and find the latest version of the package WEBO Site SpeedUp for Joomla! that should look like webo.site.speedup.vx.x.x.joomlaxx.zip (where X are version numbers) and should be about 1 Mb in size. Download it or just copy its URL. 2. In Joomla! admin panel click Extensions → Install/Uninstall. 3. Depending on your first step, enter a path to the downloaded package in Upload Package field and click Upload & Install OR enter a path to the package located on official site and click Install button afterwards. WEBO Site SpeedUp will be installed. Please do not take any actions while this process is on. 21 Visit our site www.webogroup.com
  20. 4. The success message about component installation will be shown

    up. WEBO Site SpeedUp automatically installs system plugin to handle all HTML document transformaations. 5. Installation is complete. Click Components → WEBO Site SpeedUp to start working with this plugin or refer to getting started section to learn WEBO Site SpeedUp basics. Installing Joomla! 1.5.x+ plugin manually • Download from the official site the latest version of the package WEBO Site SpeedUp for Joomla! that should look like webo.site.speedup.vx.x.x.joomla15.zip (where X are version numbers). This file should be around 2 MB in size. • Extract the following files: admin.webositespeedup.php index.html install.webositespeedup.php LICENSE.txt readme.txt 22
  21. uninstall.webositespeedup.php WeboMySql.php weboptimizer.php weboptimizer.x webositespeedup.xml to the /administrator/components/com_webositespeedup/ directory •

    Extract the directory: /web-optimizer/ to the /components/com_webositespeedup/ directory • Extract the following files: weboptimizer.php webositespeedup.xml to the /plugins/system/ directory • Extract the file: WeboMySql.php to the /libraries/joomla/database/database/ directory • Run this query for your Joomla! database (don't forget to replace with your database prefix): INSERT INTO `[[dbprefix]]components` (`name`, `link`, `menuid`, `parent`, `admin_menu_link`, `admin_menu_alt`, `option`, `ordering`, `admin_menu_img`, `iscore`, `params`, `enabled`) VALUES ('WEBO Site SpeedUp', 'option=com_webositespeedup', 0, 0, 'option=com_webositespeedup', 'WEBO Site SpeedUp', 'com_webositespeedup', 0, '../components/com_webositespeedup/web- optimizer/favicon.ico', 0, '', 1); INSERT INTO `[[dbprefix]]plugins` (`name`, `element`, `folder`, `access`, `ordering`, `published`, `iscore`, `client_id`, `checked_out`, `checked_out_time`, `params`) VALUES ('System - WEBO Site SpeedUp', 'weboptimizer', 'system', 0, 2, 1, 0, 0, 0, '0000-00-00 00:00:00', ''); • Change the dbtype value in /configuration.php file (replace asterisk with your previous dbtype value) var $dbtype = 'WeboMySql';//* You should get this, for example: var $dbtype = 'WeboMySql';//mysqli • Open file /components/com_webositespeedup/web-optimizer/ config.webo.php and set the following values: 23 Visit our site www.webogroup.com
  22. $compress_options['password'] = "[[random valid password hash]]"; $compress_options['host'] = ""; $compress_options['document_root']

    = ""; $compress_options['website_root'] = ""; $compress_options['html_cachedir'] = ""; $compress_options['css_cachedir'] = ""; $compress_options['javascript_cachedir'] = ""; You should get this, for example: $compress_options['password'] = "cbad86ef2bdfe8373bcade262354de45"; $compress_options['host'] = "site.com"; $compress_options['document_root'] = "/var/www/path-to-doc-root/"; $compress_options['website_root'] = "/var/www/path-to-doc-root/ joomla-installation/"; $compress_options['html_cachedir'] = "/var/www/path-to-doc-root/ joomla-installation/cache/wo/"; $compress_options['css_cachedir'] = "/var/www/path-to-doc-root/ joomla-installation/cache/wo/"; $compress_options['javascript_cachedir'] = "/var/www/path-to-doc- root/joomla-installation/cache/wo/"; • Installation is complete. Login to admin panel and open Components → WEBO Site SpeedUp to make sure that the plugin was installed successfully. Installing Joomla! 1.0.x plugin WEBO Site SpeedUp cannot be installed as a plugin in Joomla! 1.0.x. so there are two options: • Consider [StandaloneInstallation standalone installation of latest WEBO Site SpeedUp version (recommended). • Download and install older version of WEBO Site SpeedUp called Web Optimizer which supports Joomla! 1.0.x integration as a Mambot. In order to do that: 1. Download the package named web-optimizer.v0.6.7.joomla10.zip from official site. 2. In Joomla! admin panel click Installers → Mambot. 3. Enter a path to the downloaded package and click Upload & Install. 4. The success message will be shown up after a few seconds. 5. Check Joomla! installation directory and make sure that root .htaccess file is writable (if any) and /cache/ subdirectory is completely writable including all its files and subdirectories. This is required for normal plugin operation. 6. Installing is complete. 24
  23. Uninstalling 1. In Joomla! admin panel open Components → WEBO

    Site SpeedUp and press Disable button. 2. Open Extensions → Install/Uninstall and select Components tab. 3. Locate WEBO Site SpeedUp in components list, check it and click Uninstall icon. 4. Uninstalling is complete. We would highly appreciate if you'll also let us know the reasons of uninstalling WEBO Site SpeedUp. We are always looking forward to improve quality and effectiveness of our products. Troubleshooting Installation fails with error Component Install: Custom install routine failure or other similar Set Enable FTP value to No on a Server tab of Site → Global Configuration page. This option can be restored after WEBO Site SpeedUp is installed. Installation fails with some unable to write error or Error when connecting WEBO Site SpeedUp SQL driver Make sure that following directories are writable: • /administrator/components/ • /cache/ • /components/ • /libraries/joomla/database/database/ This will allow Joomla! to install WEBO Site SpeedUp files, its cache directory and its custom database driver (which is important for WEBO Site SpeedUp SQL Caching feature in Joomla!). Installation fails with error Unable to Find Install Package This can happen when the upload file limit in PHP is exceeded. If the package you try to install is 2 MB, set the limit to 3MB, for example, by adding the following line to your root .htaccess file: php_value upload_max_filesize 3M Otherwise you can install any other verison of WEBO Site SpeedUp for Joomla! and then update to the latest version using its admin panel. Website is unreadable or shown as a white (blank) page Disable native Joomla! GZIP Page Compression and set it to No on a page Site → Global Configuration → Server. WEBO Site SpeedUp supports gzip as well, but double compression can cause this problem. 25 Visit our site www.webogroup.com
  24. Layout problems or Pages/CSS/JavaScript/Images paths are incorrect Make sure that

    WEBO Site SpeedUp is located after System - SEF plugin or any other SEF plugns you use, but before System - Cache plugin on an Extensions → Plugin Manager page. Otherwise you may experience problems with incorrect URLs and missing assets on your website pages. Joomla! crashes with Fatal error Class 'database' not found in /plugins/system/legacy.php This happens when you enable Legacy Mode after installing WEBO Site SpeedUp as its SQL caching feature is not compatible with Legacy Mode. To avoid this problem you can disable the System - Legacy plugin at Extensions → Plugin Manager page. Otherwise just change the dbtype value in /configuration.php file to its original value (see below). Joomla crashes or shows white (blank) page or with some database related error Such problem may appear when WEBO Site SpeedUp SQL driver, which is essential for SQL caching feature, is not compatible with the website current environment. It can happen when using JoomFish, for example. Change the dbtype value in /configuration.php in Joomla! root directory to its previous value to solve this problem. Instead of this line: var $dbtype = 'WeboMySql';//mysql (or mysqli or whatever the original type was, it's backed up here) You should have the original line: var $dbtype = mysql; Alternate way to restore dbtype value is to edit Database Type field on the Server tab of Site → Global Configuration page. No traces of WEBO Site SpeedUp activity Turn off System - Cache plugin on a page Extensions → Plugin Manager and any other caching solutions you have on your website. These solutions will make it difficult to configure WEBO Site SpeedUp though they could be enabled back when WEBO Site SpeedUp is installed and configured. Can't disable WEBO Site SpeedUp through the admin panel 1. Open file /components/com_webositespeedup/web-optimizer/ config.webo.php and change $compress_options['active'] parameter value from "1" to "0". 2. Restore the original .htaccess file in your website root directory from .htaccess.backup file, created by WEBO Site SpeedUp. 26
  25. Server-side caching efficiency comparison for Joomla! Content (HTML) generation time

    with different caching settings Cache (global settings) System- Cache (plugin) WEBO Site SpeedUp WEBO Site SpeedUp Cache WEBO Site SpeedUp Cache Extreme mode Time (ms) YSlow No No No No No 325 65 Yes No No No No 143 65 Yes No Yes No No 152 93 Yes Yes Yes No No 53 93 No No Yes Yes No 43 93 No No Yes Yes Yes 4 93 27 Visit our site www.webogroup.com
  26. 2.6. Installing Magento plugin Important notes • If you will

    experience any problems during installation, please refer to Troubleshooting and Support section. • If you are using any other performance-related plugins, consider disabling them during installing and testing of WEBO Site SpeedUp. Such plugins may affect WEBO Site SpeedUp operation. And note that WEBO Site SpeedUp integrates and totally exceeds functionality of many such plugins. Just check out the WEBO Site SpeedUp feature list. • WEBO Site SpeedUp is not operational when you are logged in under admin account. To ensure that WEBO Site SpeedUp works properly, please, log off or use another browser. • After successful installation please refer to getting started section. Installing 1. Download from the official site the latest version of the package WEBO Site SpeedUp for Magento that should look like webo.site.speedup.vx.x.x.magento.zip (where X are version numbers). Package file should be around one MB in size. 2. Extract /Varien/ and /Webo/ directories from this package to the /app/ code/local/ directory of Magento installation. 3. Make sure that /app/code/local/Webo/SiteSpeedup/web-optimizer/ directory is writable including all its files and subdirectories or at least make sure that config.webo.php file and /cache/ subdirectory are writable. 4. Extract Webo_SiteSpeedup.xml file from this package to the /app/etc/ modules/ directory of Magento installation. 5. In Magento admin panel open System → Cache Management and make sure that Configuration cache is disabled or click Flush Magento Cache to refresh this cache and get WEBO Site SpeedUp working. 28
  27. 6. In Magento admin panel open System → Configuration, and

    then click Advanced item in left menu. Make sure that WEBO Site SpeedUp output is enabled in the list of modules. If it's not, set it to Enable. 7. Installation is complete. In Magento admin panel click WEBO Site SpeedUp in top menu to get to the plugin interface. Now you can refer to getting started section. 29 Visit our site www.webogroup.com
  28. Uninstalling 1. Disable WEBO Site SpeedUp using its admin interface.

    If it's unavailable for some reason, open file /app/code/local/Webo/SiteSpeedup/web- optimizer/config.webo.php and change $compress_options['active'] value from "1" to "0". Also if you disable WEBO Site SpeedUp manually, by modifying configuration file, you may also want to restore original .htaccess file in the root directory of your website from .htaccess.backup file, created by WEBO Site SpeedUp. 2. Remove /Varien/ and /Webo/ directories from /app/code/local/ directory. 3. Remove Webo_SiteSpeedup.xml file from /app/etc/modules/ directory. 4. Make sure that Configuration cache is refreshed. 5. Uninstalling is complete. We would highly apperciate if you'll also let us know the reasons of uninstalling WEBO Site SpeedUp. We are always looking forward to improve quality and effectiveness of our products. 30
  29. 2.7. Installing NetCat plugin Important notes • If you will

    experience any problems during installation, please refer to Troubleshooting and Support section. • WEBO Site SpeedUp as a native plugin is only compatible with NetCat 4.0 and above. If you have older version of NetCat use Standalone installation guide. • If you are using any other performance-related plugins, consider disabling them during installing and testing of WEBO Site SpeedUp. Such plugins may affect WEBO Site SpeedUp operation. And note that WEBO Site SpeedUp integrates and totally exceeds functionality of many such plugins. Just check out the WEBO Site SpeedUp feature list. • After successful installation please refer to getting started section. Installing 1. Download from the official site the latest version of the WEBO Site SpeedUp for NetCat that should look like webo.site.speedup.vx.x.x.netcat.tar.gz (where X are version numbers). This file should be few KB in size. 2. In NetCat admin panel open Tools → Module Installation. In the Install from local disc field chose the downloaded package and click the Upload button. WEBO Site SpeedUp will download its core package from repository, analyze the system environment and setup the initial configuration. Please do not take any actions while this process is on. It should take about one minute. 3. Open Settings → Modules List. You should see the installed WEBO Site SpeedUp module in the modules list. 31 Visit our site www.webogroup.com
  30. 4. Installation is complete. In the list of modules click

    WEBO Site SpeedUp to get to its interface. Now you can refer to getting started section. Uninstalling 1. Disable WEBO Site SpeedUp using its admin interface. If it's unavailable for some reason, open file /netcat/modules/webositespeedup/web- optimizer/config.webo.php and change $compress_options['active'] value from "1" to "0". Also if you disable WEBO Site SpeedUp manually, by 32
  31. modifying configuration file, you may also want to restore original

    .htaccess file in the root directory of your website from .htaccess.backup file, created by WEBO Site SpeedUp. 2. Remove the module using standard NetCat routine. 3. Uninstalling is complete. We would highly apperciate if you'll also let us know the reasons of uninstalling WEBO Site SpeedUp. We are always looking forward to improve quality and effectiveness of our products. 33 Visit our site www.webogroup.com
  32. 2.8. Installing WordPress plugin Important notes • If you will

    experience any problems during installation, please refer to Troubleshooting and Support section. • If you are using PHP Speedy or Web Optimizer plugins (or their standalone versions), deactivate or delete them before WEBO Site SpeedUp installation. They are not compatible with WEBO Site SpeedUp. • If you are using any other WordPress performance-related plugins, consider disabling them during installing and testing of WEBO Site SpeedUp. Such plugins may affect WEBO Site SpeedUp operation. And note that WEBO Site SpeedUp integrates and totally exceeds functionality of many such plugins. Just check out the WEBO Site SpeedUp feature list. • After successful installation please refer to getting started section. Installing 1. Download from official site latest version of the WEBO Site SpeedUp plugin for WordPress with name like webo.site.speedup.vx.x.x.wordpress.zip (where X are version numbers) and is several Kb in size. 2. Extract this archive to /wp-content/plugins/webo-site-speedup/ directory of WordPress installation. 3. In WordPress admin panel click Plugins → Installed. 4. Find WEBO Site SpeedUp plugin there and click Activate. WEBO Site SpeedUp will download its core package from repository, analyze the system environment and setup the initial configuration. Please do not take any actions while this process is on. It should take about one minute and then the success message about plugin activation will be shown up. 5. Make /webo-site-speedup/ subdirectory in /wp-content/plugins/ directory of WordPress installation completely writable including all its files and subdirectories or at least make sure that config.webo.php file and 34
  33. /cache/ subdirectory are writable. This is required for normal plugin

    operation. 6. Installation is complete. Now you can refer to getting started section. Troubleshooting Error message Curl isn't installed during WEBO Site SpeedUp installation When PHP cURL module is missing in your server environment it is impossible for the plugin installer to automatically download all necessary files from the repository. To finish installation just follow these two simple steps: • Get the latest full plugin package (file like webo.site.speedup.vx.x.x.zip) from repository. • Extract contents of the web-optimizer directory from the downloaded package into the same directory where other plugin files are already located /wp- content/plugins/webo-site-speedup/. Upgrading from Web Optimizer for WordPress 1. Deactivate Web Optimizer plugin. 2. Upload WEBO Site SpeedUp over it or just update via internal WordPress interface. 3. Delete /wp-content/plugins/web-optimizer/ directory. 4. Activate plugin. All files should be downloaded from repository automatically. 5. After activation please go to WEBO Site SpeedUp settings page, then to System Status, then to tab Update (left menu), then check Show information about beta versions. 6. Update to the latest beta version. Configuration file will be altered for the new version. 7. Delete file /wp-content/plugins/web.optimizer.wordpress.config.php. 8. Now all product updates can be safely done via WEBO Site SpeedUp interface. 35 Visit our site www.webogroup.com
  34. 3. Using WEBO Site SpeedUp Logging in Standalone application Admin

    panel of WEBO Site SpeedUp standalone application if located at the same URL which you used for installation (should be like this: http://your-website.com/ web-optimizer/). You need to authorize there using the password you specified during installation. If you forgot the password please refer to installing issues page. Logging in Native plugin If WEBO Site SpeedUp is installed as a native plugin in some of compatible systems, it is accessible via native admin panel of these systems. Authorization is made on system level in such case. Getting started • If you have a license key, open the Personal Data page and register that key using the form on that page. • Just after the installation please check your site appearance and behavior in Debug mode. If everything is fine feel free to enable the Live mode. For more information on Debug and Live modes please refer to Control Panel or System Status pages description. • You can also stay in the Debug mode and try different configurations using the Options page. Find the one which is more efficient for your website. • If there is no proper configuration you can create your own one to tune performance for your website. Use advices in Options block on the Control Panel and try to enable maximum possible optimization options in your configuration on the Options page. • Please note: system messages that are shown in the Server Status block on the Control Panel page. To achieve maximum performance most of warnings should be removed. Please refer to troubleshooting and support section to get information how to perform this. • Cache contents can be viewed on the Cache page. Don't forget to refresh cache if you are using aggressive client or server caching. • Get more speedup by using Image Optimization and Static Gzip tools (they are located in block Optimization Tools on the Control Panel). • Check for software updates using the Control Panel or System Status pages. You can even install early beta versions of WEBO Site SpeedUp. • Stay tuned for our official blog updates using the News block on the Control Panel page or subscribe to our RSS feed to learn about new technical articles, major software updates, special offers, and even more. • You can send us any feedback (using the About page) - we are interested in making WEBO Site SpeedUp more efficient and more comfortable to use. 36
  35. Please don't forget that only Premium Edition of WEBO Site

    SpeedUp allows you to get the maximum speedup for your website. Check out the Version Comparison page. Detailed interface description • Control Panel (with Static Gzip tool and Image Optimization tool subpages, both available in Premium version only). • Options • System Status (with tabs: Status, Settings, Updates, Install & Uninstall) • Personal Data 37 Visit our site www.webogroup.com
  36. 3.1. Control Panel Control Panel is a default page for

    WEBO Site SpeedUp administrative interface. This is a dashboard with several customizable blocks which show the most important information about WEBO Site SpeedUp status and website activities. To minimize a block on a Control Panel click its curved corner. To restore any minimized block click its name in Available Blocks. Control Panel blocks Application Status This block shows WEBO Site SpeedUp current mode and allows you to switch that mode by clicking Enable or Disable buttons. There are two possible modes: Debug mode and Live mode. In Debug mode WEBO Site SpeedUp performs optimization actions only if certain GET parameter is passed with the request (this parameter is "web_optimizer_debug=1" by default) or if certain cookie is set. In the Live mode WEBO Site SpeedUp performs optimization actions on every request. It is similar to the Status tab on System Status page. Options This block shows on a simple scale how effective current configuration is within limitations of your edition of WEBO Site SpeedUp (editions are: Community, Lite and Premium). Also this block shows several advices on how to make your website even faster. Server Status This block informs about any troubles and warnings which affect WEBO Site SpeedUp performance. To learn how to get rid of problems listed here refer to troubleshooting and support section. It is similar to the Status tab on System Status page. Cache Status This block shows WEBO Site SpeedUp cache size and brief information about its contents. Refresh button allows you to completely clear the cache contents and fill it again (for the home page only using chained optimization). Optimization Results This block shows the performance gained for the home page of your optimized website. 38
  37. Optimization Tools This block contains links to two optimization tools

    pages. Static Gzip tool allows you to create in specified directory .gz versions of CSS and JS (and some other) files for static gzip usage. Image Optimization tool can decrease size of images without quality loss in any specified directory on your website. These tools are available only in Premium Edition of WEBO Site SpeedUp and are described in the end of this section in more details. Quick Links This block contains few links to the most valuable resources which can make your work with WEBO Site SpeedUp more efficient. Order Qualified Help Specialists of WEBO Software are always ready to afford you qualified help with proper installation and configuration of WEBO Site SpeedUp. If you want to ensure that WEBO Site SpeedUp will work at its maximum performance rate, do not hesitate, send us a request. Updates This block shows information about the latest stable version of WEBO Site SpeedUp software and its changes log. When new version is out you can click the Update button and WEBO Site SpeedUp will automatically download and update all files preserving your current configuration. It is similar to the Updates tab on System Status page. Spread The Word WEBO Site SpeedUp made your website unbelievable fast too? Please spend few minutes to tell the world about it. Had some issues with WEBO Site SpeedUp? Many people are interested to learn from your experience, so give them some feedback using links from this block. News News are often related to technical articles, major software updates, special offers and many more. Stay tuned. Static Gzip tool Using this tool you can create in specified directory .gz versions of CSS and JS (and some other) files for static gzip usage. Modification time (mtime attribute) of compressed files is set to modification time of the initial (source) files during gzipping. Existing .gz files are refreshed when modification time of initial files and existing files are differ. 39 Visit our site www.webogroup.com
  38. To use this tool do the following: • Enter the

    absolute path to the directory which contains files you want to be compressed. • Set or remove the flag whether or not this tool should look for files in subdirectories recursively. • Click the Find files button. • Review the list of found files and set the flag for all files needed. You can also set or remove flags for all files using the box in the table header. • Click the Compress files button to start the compression process. After this tool finished processing you will get the final table with all actual compression results. Please note: if directories of some files are not writable there won't be created gzipped copies of such files. Image Optimization tool Using this tool you can decrease size of images without quality losses in any specified directory on your website. For each optimized file .backup version will be created during optimization process. GIF files are replaced with PNG ones if latter are smaller. One of the following services can be used for images optimization: smush.it (terms of service) or punypng (terms of service). Working principles of this tool are similar to described for the Static Gzip tool above. 40
  39. 3.2. Options This page allows you to manage WEBO Site

    SpeedUp configurations. Each configuration is a set of optimization options (i.e. options for merging, minimizing, gzipping, caching etc.) grouped under a single name. Active configuration is the one which is currently applied to your website and it's highlighted by the orange background in a list of configurations. To make a configuration active, select it (click it and it will get an orange border) and then click the Make active button. There are several predefined configurations: Safe, Basic, Optimal and Extreme. • Safe configuration, as is comes from its name, is the most safe set of options for every environment. But it does almost nothing to increase website performance. • Basic configuration applies the most safe optimization methods. Compatibility problems are possible in very few environments. • Optimal configuration is the most balanced one. Considerable performance is achieved usually, but it can result in some minor issues for certain environments. • Extreme configuration provides almost the best performance. You can get more only after an accurate manual configuration. Be aware that depending on environment, this configuration can significantly harm a website appearance or behavior so it's strongly recommended to review and test this configuration in a Debug mode before using it on a live website. If you want to know more details about some configuration, select it and you will see its description under its name on the top of the page. If you want to review all options in some configuration, select it and then click the Edit button or the small Pencil icon above the configuration icon. If you want to create your own configuration from scratch, click the Create New icon. To delete your configuration, select it and click the small garbage bin icon. Note that all three predefined configurations cannot be edited or deleted so when you choose to edit them and save your changes, the new configuration is created. All available optimization options are listed below. Note that some options are only available in Lite and Premium versions of WEBO Site SpeedUp. Check out the Version Comparison section. Combine CSS Combine CSS files Depending on this option CSS won't be combined, or there will be combined only CSS in <head> tag, or there will be combined the whole CSS on the page. All combined CSS code will be minified. 41 Visit our site www.webogroup.com
  40. Enable inline styles merging There will be combined all CSS

    included with the help of <style> and <link> tags. Otherwise WEBO Site SpeedUp will combine files included with <link> tag. Enable external styles merging There will be combined files located on all hosts. Otherwise WEBO Site SpeedUp will combine only files located on the same host that initial web page. Combined CSS file name Use this option to make sure that every web page has the same combined CSS file. Use it only if sets of CSS files are identical throughout the website. Pages with another sets of CSS files will still load the formely created file. The named combined file is static and when created, it is updated only on manual cache refresh. File name can include only Latin letters, numbers, hyphens, underlines, or dots. All the other symbols will be excluded. This file name may be automatically expanded with special extension to manage client side cache in browsers. Host for CSS file(s) Host to load merged CSS file. With enabled options in CDN group it will be used for all CSS files. Exclude CSS file(s) from merging Defined files won't be included into combined CSS file. You need to define only file names, not absolute paths to them. Include CSS code to all files Entered CSS code will be added to the end of each combined CSS file. This field allows you to define additional styles for website working under WEBO Site SpeedUp. Combine JavaScript Combine JavaScript files Depending on this option JavaScript won't be combined, or there will be combined only JavaScript in <head> tag, or there will be combined the whole JavaScript on the page. Enable inline JavaScript merging There will be combined both inline code in tags <script> and JavaScript code from external files. Otherwise there will be combined only JavaScript included via 42
  41. <script src="...">. Enable external JavaScript merging There will be combined

    files located on all hosts. Otherwise WEBO Site SpeedUp will combine only files located on the same host that initial web page. Combined JavaScript file name Use this option to make sure that every web page has the same combined JavaScript file. Use it only if sets of JavaScript files are identical throughout the website. Pages with another sets of JavaScript files will still load the formely created file. The named combined file is static and when created, it is updated only on manual cache refresh. File name can include only Latin letters, numbers, hyphens, underlines, or dots. All the other symbols will be excluded. This file name may be automatically expanded with special extension to manage client side cache in browsers. Host for JavaScript file(s) Host to load merged JavaScript file. With enabled options in CDN group it will be used for all JavaScript files. Exclude file(s) from combining Defined files won't be included into combined JavaScript file. You need to define only file names, not absolute paths to them. Force moving combined script to </head> Combined JavaScript file call will be moved to closing tag </head>. Safe combine mode With this option all external files will be enveloped into try-catch construction (with individual files' inclusion on failed content execution in common scope). This reduces JavaScript performance but guarantee that there will be no broken JavaScript calls due to their combine. Remove duplicates All noticed duplicates of common libraries (jQuery, Prototype, MooTools) will be removed from merging. This reduces final JavaScript file size and its initialization time, but in a few cases can break integrity of cliet side logic. Mask to merge scripts You can set the mask according to which all scripts will be included. For example you need to include the first 3 script tag to merged file, and exclude the next 2. So the mask will be xxx00. If there is no mask matching the current script tag - it will included or excluded according to the other rules. 43 Visit our site www.webogroup.com
  42. Minify Minify CSS files All excessive spaces, tabs, line breaks,

    and comments will be deleted from combined CSS file. Minify JavaScript files All excessive spaces, tabs, line breaks, and comments will be deleted from combined JavaScript file. Library choice affects minify algorithm and compression rate. Maximum compression can be achieved with any of these libraries depending on initial conditions. Exclude the following file(s) from minify File(s) listed here won't be minified with combining of JavaScript code (but will be combined according to other settings from "Combine JavaScript" group of options) Minify HTML HTML code will be cleaned from double spaces, double line breaks, empty symbols at the beginning of every string and spaces before tag ends. Tags <pre>, <textarea>, <script> will be excluded from all actions. Compress HTML to one string HTML code of result web page will be compressed to one string. This can help with removing extra spaces and line breaks. But this is CPU intensive and should be used carefully. Remove HTML comments All HTML comments will be removed. This can break conditional comments and some JavaScript counters. Gzip Gzip CSS All CSS files will be compressed via gzip. Gzip JavaScript All JavaScript files will be compressed via gzip. Gzip fonts All fonts files (.eot, .ttf, .otf etc) will be compressed via gzip. 44
  43. Gzip HTML All HTML files (.eot, .ttf, .otf etc) will

    be compressed via gzip. Use zlib PHP library zlib will be used for gzip. Check for gzip possibility via cookies WEBO Site SpeedUp can perform additional check for gzip support in browsers. If it's been defined all data will be compressed regardless Accept-Encoding header. Use deflate instead of gzip for IE6/7 In some cases gzip in IE6 and IE7 browsers can lead to incorrect page view. This option allows you to force alternative compression technique usage for these browsers. Client side cache Cache CSS All CSS files will have caching headers set to far future. Cache JavaScript All JavaScript files will have caching headers set to far future. Cache images All images will have caching headers set to far future. Cache fonts All fonts files will have caching headers set to far future. This option is applied via .htaccess. Cache video files All video files will have caching headers set to far future. This option is applied via .htaccess. Cache static assets All other static files will have caching headers set to far future. This option is applied via .htaccess. Cache HTML All images will have caching headers. Cache timeout will be set according to option "Default timeout to cache HTML". 45 Visit our site www.webogroup.com
  44. Default timeout to cache HTML Time to cache HTML files.

    Zero value means zero timeout. Cache external files External files called on web page will be served from the same host that web page itself with Expires headers using /cache/wo.static.php proxy script from the Site SpeedUp apllication directory. For example the external script call you may have on a web page will be transformed from this: &lt;script type="text/javascript" src="http://external-host.com/ test.js">&lt;/script> into this: &lt;script type="text/javascript" src="/wordpress/wp-content/ plugins/web-optimizer/cache/wo.static.php?http://external- host.com/test.js">&lt;/script> .htaccess Enable .htaccess This option will create (or modify) .htaccess file in website root directory. Also it creates backup version of this file. .htaccess file content depends on the other options in this group. Place .htaccess file locally (not to Document Root) .htaccess file will be located in local website folder but not document root of website host. Use mod_deflate + mod_filter This is required for dynamic gzip compression. It's an alternative for mod_gzip. Use mod_gzip This is required for dynamic gzip compression. It's an alternative for mod_deflate. Use mod_expires This is required for client side cache headers set. Use mod_headers This is required to support proxy servers and old browsers with correct headers. Use mod_setenvif This is required to support proxy servers and old browsers with correct headers. 46
  45. Use mod_rewrite This is required for static gzip or forced

    caching. Use mod_mime This is required for static gzip. Backlink Add a link to WEBO Site SpeedUp WEBO Site SpeedUp link is required in Community Edition and can be removed in any paid edition. Add a WEBO Site SpeedUp image File name with WEBO Site SpeedUp logo. All allowed files are located in: WEBO Site SpeedUp path/web-optimizer/images/. If this option is empty a text defined in "Text for backlink" option will be shown. Text for backlink If option "Add a WEBO Site SpeedUp image" is disabled this text will be shown in a link. Otherwise is will used as a title for image. Styles for backlink placement These styles will be applied for WEBO Site SpeedUp link. You can define link placement, its color, background, size, etc. Add <!--WSS--> to HTML document <!--WSS--> existence indicates that WEBO Site SpeedUp successfully parses this page. It's used in internal algorithms. Add load time counter Information about load time will be added to Events section if there is Google Analytics on the website installed to gather visitors stats. Performance Ignore file modification time stamp (mtime) There will be gained additional speedup (on server side). But to refresh combined files you will need to change calls of initial files in HTML code or to refresh WEBO Site SpeedUp cache. 47 Visit our site www.webogroup.com
  46. Don't check cache files existence There will be no check

    for cache files existence with this option enabled. Cache version will be defined with option "Cache version number". In this case to refresh cache files on client side (in browsers) you need to change cache version number. There will be standard cache files existence check performed with this option enabled. Cache version number Cache version defines version of all files in cache. To refresh cache on client side (in browsers) you need to change this number. Do not use regular expressions Regular expressions usage damages server performance and they can be replaced with simple string operations. But in the latter case probability of incorrect HTML parsing (for invalid (X)HTML documents only) will be higher. Uniform cache files for all browsers All browsers will receive uniform CSS, JavaScript, and HTML code. This allows you to use external caching techniques safely but this disabled a number of optimization techniques such as data:URI. Restore CSS properties All missing CSS properties which can improve CSS Sprites and data:URI creation will be searched across the CSS code. This will result in smaller cache size but may lead to huge CPU overhead in case of large amount of CSS rules to analyze. Days to store cache files You can restrict cache size by defining time to live for all cache files (in days). Zero value means no restriction. Cache engine You can choose one of the caching engines supported by your server environment to speed the HTML caching up. All engines except file system cache records in RAM by default, this decreases access time. data:URI Apply data:URI Background images will be converted to base64 format and included directly into CSS files for all browsers which support data:URI. 48
  47. Apply mhtml Background images will be converted to mhtml format

    and included directly into CSS files for all versions of Internet Explorer which don't support data:URI. Maximum data:URI size Images which size is greater than given number won't be converted to base64 format. No value or zero value means no limit. Maximum mhtml size Images which size is greater than given number won't be converted to mhtml format. No value or zero value means no limit. Exclude files from data:URI Images listed in this option won't be converted to data:URI. Please provide only file names not absolute paths. Exclude files from mhtml Images listed in this option won't be converted to mhtml. Please provide only file names not absolute paths. Separate images from CSS code Combined CSS code and images in base64 and mtml formats will be stored in different files. This should increase cachebility. CSS Sprites Apply CSS Sprites Background images will be combined with the help of CSS Sprites technique. Related CSS code will be safely modified. "Aggressive" combine mode for CSS Sprites Number of CSS Sprites images and their size will be lower but this may lead to graphical artifacts on web pages. Exclude IE6 IE6 will receive its own CSS file without CSS Sprites. Maximum width and height of images Images higher or wider than defined number won't be included into CSS Sprites. No value or zero value means no restriction. 49 Visit our site www.webogroup.com
  48. Combine HTML images A lot of small HTML images can

    be merged together to reduce number of HTTP requests as well. In this case there is a transparent image inserted into HTML document instead of initial one (with data:URI if possible). And it has the initial image as a background. Maximum width and height of HTML images HTML images heigher or wider than defined number won't be included into CSS Sprites. No value or zero value means no restriction. Combine images for the current page only HTML images can be combined for the current page only (this reduces size of the final file, but increases number of such files) or for all website pages. In the last case there will be used the only image for the whole website, but its size can be very large. Exclude / include files for CSS Sprites All images listed below either won't included into CSS Sprites, or there will be included only these images. Add free space for CSS Sprites Images in CSS Sprites will be rounded with free space to prevent side effects on web page scale in browsers. CSS Sprites file size will be a bit greater. Images' format If you choose automated format detection possibility of any side effects in CSS Sprites images will be minimal. If you choose JPEG format rate quality/size for true color images will the best but there will be no transparency. Server side cache Cache generated HTML files HTML pages will be cached for timeout set in option "Default HTML cache timeout". This option allows you to significantly speedup web pages load with long generation time. But this is reasonable only for static pages without dynamic content. Default HTML cache timeout After this time all cached HTML pages will be recreated on server side. Only cache first n bytes of content (flush early) HTML cache will contain not the whole web page but the first n bytes of it (set in option "Flush content size"). And this amount of data will be flushed to browser 50
  49. earlier than the rest web page content. So browser will

    receive calls to required resources earlier and don't wait the rest of the page to start their load. Flush content size Size of cached flushed part of a web page. It can be fixed (to avoid any issues with browsers or network connection). Empty (or zero) value leads to flush the whole web page content before closing </head> tag. List of parts of URLs to ignore from caching Often server side caching can't be used for pages with dynamic content. For example user account pages, statistic pages, and more. This option allows you to set parts of URL (masks) to exclude pages from server side caching. List of USER AGENTS (robots) to add to caching This option allows you to set a list of USER AGENTS which will receive only cached HTML pages. For example caching HTML pages for all search engines can reduce server side load. List of cookie to exclude from server side caching You can also skip server side caching for user who have one of the cookie from this list. This can be useful for authorized users or during the work with shopping cart. GET parameters list to exclude on caching (separated by space) You can define GET parameters which will be striped from hash key creation to cache any website page. This can help if you have some statistical parameters (i.e. advertisement campaigns) which don't influence your website content). This will help to reduce cache size and increase its efficiency. Extreme mode In extreme mode all HTML documents will be served from cache directly, bypassing normal CMS processing. This will significantly increase website performance (especially useful on traffic peaks), but cache can be refreshed only manually. By default extreme mode for server side caching is available only on systems which uses web-servers with .htaccess support (Apache, LiteSpeed). Other web-servers configurations should be manually changed, according to Integration with website section of documentation. DB Cache Cache DB queries All DB queries will be cached if their execution take more than time set below. This will increase load speed of all website pages. To make DB cache working correctly you need to install WEBO Site SpeedUp as system extension (not as 51 Visit our site www.webogroup.com
  50. standalone application). Queries execution time (ms) All queries which execution

    time (in ms) is greater will be cached. DB cache timeout (s): After this time all SQL queries will be re-requested from the current DB. Exclude table(s) (separated by space) (separated by space): ?You can exclude some tables from DB caching logic by setting their names (without prefix). All queries from such tables won't be cached. Unobtrusive JavaScript Unobtrusive JavaScript With basic mode all supported widgets will be loaded on onDOMloaded event. With advanced mode - on window.onload event (this increases website load speed by Google) according to the other options in this section. Available options: basic mode and advanced mode. Include combined JavaScript file before </body> Combined JavaScript files will be moved to closing </body> tag. This option has more priority than "Force moving combined script to </head>". Move all JavaScript code to </body> All JavaScript calls will be moved to closing </body> tag according to their initial order on the web page. Move JavaScript widgets calls before </body> The whole JavaScript code from widgets calls will be moved to </body>. Move counter calls before </body> The whole JavaScript code from counters calls will be moved to </body>. Move advertisement calls before </body> The whole JavaScript code from ads (context and banners) calls will be moved to </body>. Defer iframes loading The whole HTML code from iframes calls will be moved to </body>. 52
  51. Load background images on DOMready event Background images' load will

    be delayed to DOMReady event. This will increase initial web page render speed in browsers. CDN Distribute images All images called on web page will be automatically distributed through multiple hosts (mirrors). For example URL http://www.site.com/i/logo.png or /i/bg.jpg can be replaced with http://i1.site.com/i/logo.png and http://i2.site.com/i/bg.jpg in case if both hosts i1 and i2 are available and listed in option "Allowed hosts". Check hosts' availability automatically Available hosts will be checked automatically for images' existence. Allowed hosts Listed hosts will be used to distribute images. Please define no more than 4 hosts. Distribute CSS files All CSS files will be served via host defined as "Host for CSS files" in "Combine CSS" group of options. Distribute JavaScript files All CSS files will be served via host defined as "Host for JavaScript files" in "Combine JavaScript" group of options. Exclude the following files from distribution (separated by space) You can set a list of files (i.e. dynamic ones) to exclude from distibution logic. CDN usage You can either setup CDN usage by yourself (with settings of the current group and host for CSS/JavaScript files) or just choose one of the supported options. Available options: manual setup, current CDN (cdn.website.com), Coral CDN (.nyud.net) FTP access to upload files If you are using paid CDN (i.e. EdgeCast) it may be necessary to setup FTP access to upload all new assets. FTP access string must be given in the format user:password@host (or user:password@host:port). Note that only combined CSS and JS files can be uploaded via FTP as this is very time consuming operation. 53 Visit our site www.webogroup.com
  52. Host available via HTTPS If your website is using HTTPS,

    you need at least 1 domain which has SSL certificate to serve files through CDN. This host will be used to distribute all types of files with secured (HTTPS) requests. 54
  53. 3.3. System Status System Status is a page that consists

    of four tabs: Status This tab shows WEBO Site SpeedUp current mode and allows you to switch that mode by clicking Enable or Disable buttons. There are two possible modes: Debug mode and Live mode. In Debug mode WEBO Site SpeedUp performs optimization actions only if certain GET-parameter is passed with the request (that is "web_optimizer_debug=1" by default) or if certain cookie is set. In Live mode WEBO Site SpeedUp performs optimization actions on every request. It also informs about any troubles and warnings that affects WEBO Site SpeedUp performance. To learn how to get rid of problems listed here refer to troubleshooting and support section. Warnings about Apache modules (and possible memory restriction) are not related to WEBO Site SpeedUp logic but depend on current server configuration. Please contact your hosting provider to eliminate these warnings. Usually disabled modules don't influence general optimization algorithms because WEBO Site SpeedUp has very good graceful degradation for a lot of various environments. This tab is similar to the blocks Application Status and Server Status on Control Panel page. Settings This tab allows you to review and change WEBO Site SpeedUp program settings. In most cases these settings are set automatically and should not be modified. Change them only if you know what you are doing. Settings are the following. Cache This page contains details about cache contents. These cached files are optimized files that WEBO Site SpeedUp gets from your system and sends to end users, making the optimization process much faster. Refresh button allows you to entirely clear the cache contents and fill it again as if you had opened index page of your website. Cache refreshing is usually needed: • after WEBO Site SpeedUp configuration, • when site contents is changed and Server Side HTML caching option is applied. Similar to the Cache block on Control Panel page. 55 Visit our site www.webogroup.com
  54. Website address Domain name or IP address of your website.

    For example: mysite.com. It is used to determine external resources and also as a domain for merged CSS and JS files. You can also set here the following domains here (to use them as a static mirror for the mentioned files). • js.yourwebsite.com • css.yourwebsite.com • beta.yourwebsite.com • test.yourwebsite.com • local.yourwebsite.com • stat.yourwebsite.com • stat1.yourwebsite.com • static.yourwebsite.com • dev.yourwebsite.com • www2.yourwebsite.com • cdn.yourwebsite.com Path to website root directory Absolute path to the root directory of your website. Path to DOCUMENT_ROOT Absolute path to the root directory of the website's host. Path to CSS cache directory This directory contains all files of CSS cache. Path to JavaScript cache directory This directory contains all files of JavaScript cache. Path to HTML cache directory This directory contains all files of HTML cache. Protect WEBO Site SpeedUp installation via htpasswd This option provides additional security for WEBO Site SpeedUp installation with the help of HTTP Basic Authorization and .htaccess and .htpasswd files. Login to protect WEBO Site SpeedUp with .htpasswd To protect WEBO Site SpeedUp with .htpasswd you need to define login and password. Login is set with this option. Password is equal to WEBO Site SpeedUp installation password. 56
  55. Username and Password (to access via HTTP Basic Authorization) If

    your website is protected via HTTP Basic Authorization you need to declare username and password so WEBO Site SpeedUp can process all required resources from the website. Exclude URL from optimization Sometimes you may need to exclude some parts of website from WEBO Site SpeedUp processing. In this case you need to set meaningful parts (masks) for such sections / URL, separated by space. Updates This tab shows information about the latest stable version of WEBO Site SpeedUp software and its changes log. When new version is out you can click the Update button and WEBO Site SpeedUp will automatically download and update all files preserving your current configuration. Also you can get the latest beta version from here. Please be careful with it - and you can always roll back to the stable one if something is wrong. This tab is similar to the block Updates on Control Panel page. Install & Uninstall This tab is only active if WEBO Site SpeedUp is installed as a standalone application. If WEBO Site SpeedUp is installed on the system that is in supported systems list this tab shows information about all changes made to the source files of that system during installation. There are two buttons that allow you to Install or Uninstall these changes. When these changes are uninstalled, system is rolled back to its original state (note that all WEBO Site SpeedUp files including configuration files and all cache files and will be preserved) , but you can always restore these changes anytime press "Install" button. If WEBO Site SpeedUp is installed on a system that is not in the supported systems list, this tab contains instructions on how to install and uninstall WEBO Site SpeedUp manually. 57 Visit our site www.webogroup.com
  56. 3.4 Personal Data This page contains a single form which

    fields are described below. Personal Data fields License key It is the key which makes all features of Lite or Premium Editions available (depending on your license). And it is unnecessary for the Community Edition which can be used only on non-commercial websites. For commercial websites there are two editions — Lite or Premium (see Version Comparison section) and both are licensed for an unlimited period. License key registration is performed automatically. You just need to enter the valid key into the corresponding field and press the "Save" button. You can ask any questions regarding WEBO Site SpeedUp license policy using our contacts listed on the official website. For all plugins except Joomla! new options will be visible and available just after the license key is saved. For Joomla! plugin (due to internal system API) all options are always visible but, they will become active only after you enter and save the valid license key. Also Joomla! requires to refresh WEBO Site SpeedUp cache. E-mail This e-mail address is used only for information about urgent updates, greetings, and special offers Allow to use my data about optimization results Statistical information about website acceleration can be sent to WEBO Software servers. This information won't be published and will be used only to improve WEBO Site SpeedUp services and efficiency. No private data will be sent. If WEBO Site SpeedUp is installed as a standalone program there are also three fields that allows you to change the current password. Plugin versions of WEBO Site SpeedUp do not use a password in addition to web system native authorization means. 58
  57. 4. Understanding WEBO Site SpeedUp The most effective optimization requires

    better understanding of all optimization techniques and principles. WEBO Site SpeedUp works as a very light proxy for your PHP website — it buffers all output content (or just gets it through CMS API), applies all possible optimizations, and gives accelerated HTML to your end-users. All actions are tested and verified through tough performance standards so overall server load won’t increase. Moreover by implementing caching techniques WEBO Site SpeedUp can reduce CPU computations intensity and increase your web server margin of safety. Two schemes below shows website operation cycle without WEBO Site SpeedUp and with WEBO Site SpeedUp respectively. In following sections you will learn how WEBO Site SpeedUp integrates with any CMS and even static HTML website, how it carries out all optimization actions and even how you can expand effectiveness of optimization by utilizing WEBO Site SpeedUp API: • Integration with Website • Optimization algorithm • Creating CSS for better CSS Sprites • Plugins API • System files 59 Visit our site www.webogroup.com
  58. 4.1. Integration with website Integration approaches WEBO Site SpeedUp can

    be integrated into your website in several ways: • Buffered approach • Raw approach • Complex approach Buffered approach It's the most common way. First call of WEBO Site SpeedUp (with library require) ends with ob_start(). Then all content (there can be either simple echo $content or hundreds of different echo 'some tag') echoed till the next call of WEBO Site SpeedUp will be buffered. The second (and the last) call $web_optimizer->finish(); ends buffering with ob_get_clean(). And then this content (HTML document) is parsed and optimized. Generally it looks like this: require('.../web.optimizer.php'); ... echo ... ... echo ... ... $web_optimizer->finish(); There are several issues with PHP buffers from website subsystems, so sometimes this approach won't work. But usually it can be used for any website. Raw approach There is a possibility to parse HTML content with WEBO Site SpeedUp without buffering. It can be achieved by following lines of code: $not_buffered = 1; require('.../web.optimizer.php'); $content = $web_optimizer->finish($content); As shown in the example, WEBO Site SpeedUp can receive entire HTML document on its input and return it optimized. This approach can also be useful to create a complex application with scheduled optimization. Complex approach Both described above approaches can be used in one place. A good example of usage has been implemented into WordPress plugin: 60
  59. /* main function for every page execution */ function web_optimizer_init()

    { ob_start('web_optimizer_shutdown'); } /* envelope output buffer with optimization actions */ function web_optimizer_shutdown ($content) { $not_buffered = 1; require(dirname(__FILE__) . '/web-optimizer/ web.optimizer.php'); return $web_optimizer->finish($content); } /* add init and finish hook */ add_action('plugins_loaded', 'web_optimizer_init'); Buffered approach is implemented in web_optimizer_init function, where buffering is initialized and delayed until webpage content is ready to be sent to browser. At the same time function web_optimizer_shutdown implements raw approach and returns optimized content after single WEBO Site SpeedUp call. Scheduled optimization WEBO Site SpeedUp can be used in deployment process of any website in static mode. Just open all website pages when WEBO Site SpeedUp is installed, and then just copy resulted HTML documents to cache folders. We can for example run wget and get optimized website mirror that can be deployed on production server. wget -d -r -c http://dev.yoursite.ru/ Server-side changes Source files changes In case of standalone installation, WEBO Site SpeedUp adds two lines of code in the beginning and in the end of a few files which responds for HTML output (depending on system). Most often the only changed file is an index.php in a website root directory. In case of native plugin installation no changes in system files are usually made except of common changes to install the plugin. The only file which can be modified on every system is .htaccess file in website root directory. Note that this file is modified only when Enable .htaccess option on .htaccess tab of Settings page is checked. WEBO Site SpeedUp automatically backups all modified files. Backup files gets gets .backup extension. For example, original index.php file will become index.php.backup after WEBO Site SpeedUp installation. Newly created index.php file will contain all changes WEBO Site SpeedUp needs to work properly. 61 Visit our site www.webogroup.com
  60. WEBO Site SpeedUp never modifies other source files, images, CSS

    or JS files without your notice. Optimized files are stored and served from a separate cache directories leaving original files untouched. The exception is Image Optimization tool but it runs only on demand and backups all optimized images too. .htaccess changes If Enable .htaccess option on .htaccess tab of Settings page is checked, WEBO Site SpeedUp automatically changes .htaccess file to implement all necessary optimization techniques. These changes are described below. mod_expires – all cached headers ExpiresActive On If we cache HTML files <FilesMatch \.(html|xhtml|xml|shtml|phtml|php)$> ExpiresDefault "access plus here_goes_HTML_timeout seconds" </FilesMatch> ExpiresByType text/html A_HTML_timeout ExpiresByType text/xml A_HTML_timeout ExpiresByType application/xhtml+xml A_HTML_timeout ExpiresByType text/plain A_HTML_timeout If we cache CSS files <FilesMatch \.css$> ExpiresDefault "access plus 10 years" </FilesMatch> ExpiresByType text/css A315360000 If we cache JavaScript files <FilesMatch \.js$> ExpiresDefault "access plus 10 years" </FilesMatch> ExpiresByType text/javascript A315360000 ExpiresByType application/javascript A315360000 ExpiresByType application/x-javascript A315360000 ExpiresByType text/x-js A315360000 ExpiresByType text/ecmascript A315360000 ExpiresByType application/ecmascript A315360000 ExpiresByType text/vbscript A315360000 ExpiresByType text/fluffscript A315360000 If we cache images <FilesMatch \.(bmp|png|gif|jpe?g|ico)$> ExpiresDefault "access plus 10 years" </FilesMatch> ExpiresByType image/gif A315360000 62
  61. ExpiresByType image/png A315360000 ExpiresByType image/jpeg A315360000 ExpiresByType image/x-icon A315360000 ExpiresByType

    image/bmp A315360000 If we cache fonts <FilesMatch \.(eot|ttf|otf|svg)$> ExpiresDefault "access plus 10 years" </FilesMatch> ExpiresByType application/x-font-opentype A315360000 ExpiresByType application/x-font-truetype A315360000 ExpiresByType application/x-font-ttf A315360000 ExpiresByType application/x-font A315360000 ExpiresByType font/opentype A315360000 ExpiresByType font/otf A315360000 ExpiresByType application/vnd.oasis.opendocument.formula-template A315360000 ExpiresByType image/svg+xml A315360000 ExpiresByType application/vnd.ms-fontobject A315360000 ExpiresByType font/woff A315360000 If we cache video files <FilesMatch \.(flv|wmv|asf|asx|wma|wax|wmx|wm)$> ExpiresDefault "access plus 10 years" </FilesMatch> ExpiresByType video/x-flv A315360000 ExpiresByType video/x-ms-wmv A315360000 ExpiresByType video/x-ms-asf A315360000 ExpiresByType video/x-ms-asx A315360000 ExpiresByType video/x-ms-wma A315360000 ExpiresByType video/x-ms-wax A315360000 ExpiresByType video/x-ms-wmx A315360000 ExpiresByType video/x-ms-wm A315360000 If we cache other static assets <FilesMatch \.(swf|pdf|doc|rtf|xls|ppt)$> ExpiresDefault "access plus 10 years" </FilesMatch> ExpiresByType application/x-shockwave-flash A315360000 ExpiresByType application/pdf A315360000 ExpiresByType application/msword A315360000 ExpiresByType application/rtf A315360000 ExpiresByType application/vnd.ms-excel A315360000 ExpiresByType application/vnd.ms-powerpoint A315360000 mod_deflate + mod_filter (if mod_gzip is absent) – all gzip logic AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE image/x-icon 63 Visit our site www.webogroup.com
  62. Gzip CSS files AddOutputFilterByType DEFLATE text/css Gzip JavaScript files AddOutputFilterByType

    DEFLATE text/javascript AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE text/x-js AddOutputFilterByType DEFLATE text/ecmascript AddOutputFilterByType DEFLATE application/ecmascript AddOutputFilterByType DEFLATE text/vbscript AddOutputFilterByType DEFLATE text/fluffscript mod_gzip – all gzip logic if mod_deflate is absent Initialize gzip module mod_gzip_on Yes mod_gzip_can_negotiate Yes mod_gzip_static_suffix .gz AddEncoding gzip .gz mod_gzip_update_static No mod_gzip_keep_workfiles No mod_gzip_minimum_file_size 500 mod_gzip_maximum_file_size 5000000 mod_gzip_maximum_inmem_size 60000 mod_gzip_min_http 1000 mod_gzip_handle_methods GET POST mod_gzip_item_exclude reqheader \"User-agent: Mozilla/4.0[678]\" mod_gzip_dechunk No Add gzip for page mod_gzip_item_include mime ^text/html$ mod_gzip_item_include mime ^text/plain$ mod_gzip_item_include mime ^image/x-icon$ mod_gzip_item_include mime ^httpd/unix-directory$ Add gzip for CSS files mod_gzip_item_include mime ^text/css$ Add gzip for JavaScript files mod_gzip_item_include mime ^text/javascript$ mod_gzip_item_include mime ^application/javascript$ mod_gzip_item_include mime ^application/x-javascript$ mod_gzip_item_include mime ^text/x-js$ mod_gzip_item_include mime ^text/ecmascript$ mod_gzip_item_include mime ^application/ecmascript$ mod_gzip_item_include mime ^text/vbscript$ mod_gzip_item_include mime ^text/fluffscript$ 64
  63. mod_headers – to safe headers for gzip / expires +

    ETag Disable caching for gzipped files on proxies <FilesMatch \.(css|js)$> Header append Vary User-Agent Header append Cache-Control private </FilesMatch> Disable Last-Modified (add ETag instead) -- not vice versa? <FilesMatch \.(ico|pdf|flv|swf|jpe?g|png|gif|bmp|js|css)$> Header unset Last-Modified FileETag MTime </FilesMatch> mod_setenvif – to make gzip headers safe for all browsers Exclude problem browsers from gzip BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html Finding out compression type and browser type for extreme mode of server side caching SetEnvIfNoCase accept-encoding deflate WSSENC=.df SetEnvIfNoCase accept-encoding gzip WSSENC=.gz BrowserMatch "MSIE 6" WSSBR=.ie6 BrowserMatch "MSIE 7" WSSBR=.ie7 BrowserMatch "MSIE 8" WSSBR=.ie8 BrowserMatch "Android|BlackBerry|HTC|iPhone|iPod|LG|MOT|Mobile|NetFront|Nokia|Opera Mini|Palm|PPC|SAMSUNG|Smartphone|SonyEricsson|Symbian|UP.Browser|webOS" WSSBR=.ma mod_rewrite + mod_mime (in addition to mod_deflate or mod_gzip) -- to gzip CSS / JS files statically Add Encoding for gziped files AddEncoding gzip .gz Add redirects to static files (file names are set with timestamps to force cache reload on the client side properly) RewriteRule ^(.*)\.wo[0-9]+\.(css|php)$ $1.$2 RewriteRule ^(.*)\.wo[0-9]+\.(js|php)$ $1.$2 Add static gzip for CSS files RewriteCond %{HTTP:Accept-encoding} gzip RewriteCond %{HTTP_USER_AGENT} !Konqueror RewriteCond %{REQUEST_FILENAME}.gz -f RewriteRule ^(.*)\.css$ $1.css.gz [QSA,L] 65 Visit our site www.webogroup.com
  64. Add static gzip for JavaScript files RewriteCond %{HTTP:Accept-encoding} gzip RewriteCond

    %{HTTP_USER_AGENT} !Konqueror RewriteCond %{REQUEST_FILENAME}.gz -f RewriteRule ^(.*)\.js$ $1.js.gz [QSA,L] Adde redirect rules for extreme mode of server side caching (for WordPress, for example) RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp- postpass_).*$ RewriteCond %{REQUEST_METHOD} !=POST RewriteCond /path-to-document-root/wp-content/plugins/webo-site- speedup/cache/ %{REQUEST_URI}%{QUERY_STRING}index%{ENV:WSSBR}.html%{ENV:WSSENC} - f RewriteRule (.*) /wp-content/plugins/webo-site-speedup/cache/$1/ index%{ENV:WSSBR}.html%{ENV:WSSENC} [L] Changes for nginx configuration file Following rules should be manually added to nginx configuration file to enable gzip compression, client-side caching and extreme mode server-caching. gzip on; gzip_comp_level 7; gzip_types text/plain text/xml application/xhtml+xml image/x-icon text/css text/javascript application/javascript application/x- javascript text/x-js text/ecmascript application/ecmascript text/ vbscript text/fluffscript image/svg+xml application/x-font-ttf application/x-font font/opentype font/otf font/ttf application/x- font-truetype application/x-font-opentype; if ($http_accept_encoding ~* deflate) { set $wssenc .df; } if ($http_accept_encoding ~* gzip) { set $wssenc .gz; } if ($http_user_agent ~ "MSIE 6") { set $wssbr .ie6; } if ($http_user_agent ~ "MSIE 7") { set $wssbr .ie7; } if ($http_user_agent ~ "MSIE 8") { set $wssbr .ie8; } if ($http_user_agent ~ "Android|BlackBerry|HTC|iPhone|iPod|LG|MOT|Mobile|NetFront|Nokia|Opera Mini|Palm|PPC|SAMSUNG|Smartphone|SonyEricsson|Symbian|UP.Browser|webOS") 66
  65. { set $wssbr .ma; } if ($request_method != POST) {

    set $cache_file_name /path-to-document-root/wp-content/ plugins/webo-site-speedup/cache/$http_host$request_uri/ index$wssbr.html$wssenc; } if ($http_cookie ~* "wordpress|wp-postpass_") { set $cache_file_name ''; } if (-f $cache_file_name) { rewrite ^ /wp-content/plugins/webo-site-speedup/cache/ $http_host$request_uri/index$wssbr.html$wssenc break; } location ~* ^/wp-content/plugins/webo-site-speedup/cache/.*\.gz { gzip_static on; rewrite ^(.*)\.gz$ $1; } location ~* ^/wp-content/plugins/webo-site-speedup/cache/.*\.df { gzip_static off; add_header Content-Encoding deflate; } rewrite ^(.*)\.wo[0-9]+\.(css|php)$ $1.$2; rewrite ^(.*)\.wo[0-9]+\.(js|php)$ $1.$2; rewrite ^(.*)\.wo[0-9]+\.(jpe?g|png)$ $1.$2; location ~* \.(jpg|jpeg|gif|png|css|js)$ { root /path/to/document/root; expires max; add_header Last-Modified: $date_gmt; } 67 Visit our site www.webogroup.com
  66. 4.2. Optimization algorithm Content parsing Initial HTML file parising •

    Head section with: ◦ <script> tags . ◦ <style> and <link> tags. • All scripts’ content • We parse defined head section (and scripts’ array) through 3 functions (for each main group) – page, css, javascript. Parsing scripts and styles into array • Define if file has src or href – so it’s an external one. • Inline code is put into content of item in scripts array. • Full content of files is mined only if “Don’t check files’ MTIME” option is disabled. • Cache file name is generated. If cached file exists we don’t do anything more – just remove current scripts’ and put 1 generated one into head. ◦ If we have unobtrusive load of JavaScript – put JavaScript call before closing </body>. ◦ If we merged external and inline scripts – put JavaScript call before </head>. ◦ If we don’t merge all scripts – put JavaScript call after CSS file. ◦ Put CSS file after <head> -- to load it as fast as possible. • If we don’t have cached file – and we have “Don’t check files MTIME” option enabled – get all scripts’ content. Content optimization JavaScript code • All merged content is passed through JSMin / Packer or YUI Compressor. • If compression / caching isn’t via .htaccess – form .php file with all gzip / caching headers. CSS code • CSS files are merged with all @import constructions (recursively). • CSS Tidy is applied (if CSS Sprites or data:URI are used). • Otherwise simple regular expression to minify CSS content. • If compression / caching isn’t via .htaccess – form .php file with all gzip / caching headers. 68
  67. CSS Sprites applying • CSS Tidy parses initial merged CSS

    file and forms hash of CSS rules. • CSS rules are parsed for background-properties (background, background- position, background-image). • CSS rules are parsed for width, height, padding. Also we try to detect correct CSS selector for pseudo-variants (i.e. :hover, :link, etc – all CSS3 selectors) and detect inherited properties. • If we have CSS image with multiple background-position – it’s excluded (seems to be initial CSS Sprite). • If we have background-repeat: repeat – it’s excluded. • If we have background-repeat: repeat-x and we don’t have height (or it’s in relative units) – mark it as repeat-xl (to merge 1 image with all repeat-x at bottom). • If we have background-repeat: repeat-x and we have height – mark is as repeat-x. • If we have background-repeat: repeat-y and we don’t have width (or it’s in relative units) – mark it as repeat-yl (to merge 1 image with all repeat-y at bottom). • If we have background-repeat: repeat-y and we have width – mark it as repeat-y. • If we have background-position: bottom and background-repeat: no-repeat – mark it as no-repeatb. • If we have background-position: right and background-repeat: no-repeat – mark it as no-repeatr. • If we have background-repeat: no-repeat and we don’t have width or height (or have them in relative units) and no right or bottom – mark it as no-repeati (to merge images as icons – by steps). • If we have background-repeat: no-repeat and we have width and height (and no right or bottom) – mark it no-repeat. • If we can’t detect proper case (i.e. background-position : none) – it’s excluded. • Get actual image size. Remember initial position (background-position), image sizes are increased by paddings. Container size (from CSS rule) is remembered as initial shift (total 3 pairs of values – position, image dimensions and possible shift). • Glue all images by their type. For repeat-x and repeat-y found small no-repeat images and put them in the beginning. At the end put 1 repeat-xl or repeat-yl image. No-repeatb are merged and glued to the bottom, no-repeatr – to the right. All this except no-repeat and no-repeati. • For no-repeat image calculate position (by 2-dimensions matrix, simple algorithm). • After include into this sprite no-repeati images (by steps to the free positions). • Include into combined sprite no-repeatb (to the left bottom corner) and no- repeatr (to the right top corner). • CSS rules are renewed with calculated images’ positions and repeat. Multiple CSS rules for 1 background-image are merged into 1 (for data:URI 69 Visit our site www.webogroup.com
  68. optimization). • Images’ filenames are formed by md5-hash from all

    CSS rules that participate in Sprites’ creation. We check if image exists before creating new Sprite. • Call smush.it to optimize final CSS Sprites image. • If we don’t have CSS Spirtes image (GDlib error?) – return background property for CSS selector and don’t remove other background properties. • Apply data:URI (via CSS rules hash). 70
  69. 4.3. CSS Sprites Overview CSS Sprites as a powerful tool

    to merge different background images together with no restrictions in website layout or design, but with significant reduce in loaded objects number. What is a CSS Sprite? CSS Sprite actually is a single image with a lot of images included. It is very similar to an image map. With background-position CSS property we can cut from this image required part and show it on the page. Also it's important to know actual dimensions of an object with background image - to make sure that other images from CSS Sprite won't be shown. How to use it? You need to put all images together in one file and calculate their positions to insert into CSS rules. If you have several images it's not a complicated task. But if you have dozens or hundreds of images — this can be very tricky and time consuming to combine all of them into one or two CSS Sprites. How can I help? WEBO Site SpeedUp automatically parses all CSS rules, finds all possible variants to use CSS Sprites and apply them. There a number of restrictions, so you can write your CSS and keep in mind general rules to help WEBO Site SpeedUp analyze you code better and improve performance of your website. Few rules to write CSS code for better parsing. • Use only absolute positions in background-position. Using relative values (i.e. em, %, or even center, bottom, right) will force WEBO Site SpeedUp to compute dimensions of a mentioned block, and sometimes it can't be done for sure. If you can't set absolute positions - just try to set absolute dimensions for these blocks. • Use only absolute values in width, height, and padding properties. If WEBO Site SpeedUp finds absolute values for position but relative values for dimensions it can properly calculate better position for current background image. So it can be combined with a lot of free space around it, or even not combined. • Avoid using complicated CSS selectors for background images. WEBO Site SpeedUp can't parse all CSS rules tree correctly, it can apply only some actions to detect a number of required properties (background-image, background- position, background-repeat, width, height, padding). It's better for WEBO Site SpeedUp to have all these properties in one CSS selector (no ancestors), it's also better for accelerating rendering of your pages in browsers 71 Visit our site www.webogroup.com
  70. (due to decreased numbers of CSS selectors applied). • Try

    to exclude complicated cascading rules for background properties. For example instead of li.item, .active, .passive try to set .menu li, .menu li.active, .menu li.passive. Such cascade can be parsed with WEBO Site SpeedUp successfully. • Exclude unused CSS rules or move rarely used rules for pages where they are used. WEBO Site SpeedUp tries to combine all found images. It can't make sure which images are used on the current web page and which are not. So removing unused selectors reduces overall CSS Sprites size (and increases web pages rendering speed due to lesser amount of CSS selectors). • Do not use different background-position for the same background image if it's not a CSS Sprite. WEBO Site SpeedUp excludes images with multiple background position (as far as they seem to be Sprites), so such images won't be combined. You can also use margin in CSS rules as a possible alternative for background-position. All these rules will help WEBO Site SpeedUp to analyze your CSS code structure and prepare better CSS Sprites. Additional notes You can use magic word 'nosprites' in your classes, or ID, or attributes (in CSS code or in images names in HTML code) to skip CSS Sprites creation. This will work both for CSS and HTML Sprites. I.e. if you have .link .nosprites{background:url(image.png)} then image.png will be skipped from CSS Sprites routine. Also if you have in HTML code &lt;img class="nosprites_additional" src="image.jpg" alt="My Image"/&gt; image.jpg will be excluded from HTML Sprites creation. 72
  71. 4.4. Plugins API Plugins API is aimed to allow developers

    one more way to optimize (accelerate) CMS automatically on server-side, on client-side or both. Right now plugins have some hooks: • onInstall — actions that are applied on WEBO Site SpeedUp installation. • onUninstall — actions that are applied on WEBO Site SpeedUp uninstall. • onBeforeOptimization — actions that are applied to the web page content before any optimization actions are performed by WEBO Site SpeedUp. • onAfterOptimization — actions that are applied to the web page content after all optimization actions are performed by WEBO Site SpeedUp (can be cached). • onCache — actions that are applied every time to the web page content if it's cached (on output of cache content). Plugin skeleton There is general example of WEBO Site SpeedUp plugin: <?php if (!class_exists('web_optimizer_plugin_name')) { /* class declaration starts */ class web_optimizer_plugin_your_cms_here { /* Constructor, actually not used */ function web_optimizer_plugin_your_cms_here() { } /* Installer */ function onInstall ($root) { /* $root can be used to operate with local files */ } /* UnInstaller */ function onUninstall ($root) { /* $root can be used to operate with local files */ } /* preOptimizer */ function onBeforeOptimization ($content) { /* $content is current web page content */ return $content; } /* postOptimizer */ function onAfterOptimization ($content) { /* $content is optimized web page content */ return $content; } /* Cacher */ function onCache ($content) { /* $content is cached web page content */ return $content; 73 Visit our site www.webogroup.com
  72. } } /* class declaration ends */ } ?> Your

    plugin file name must be the same as the class plugin defines. I.e. plugin creates class named 'plugin_class' than plugin file must be named 'plugin_class.php'. If you don't want to use all avaliable hooks in your plugin you can extend your class from webo_plugin class which is included if any plgins are enabled. This class provides the default implementation of all hooks methods. Good example of WEBO Site SpeedUp plugin is Joomla! 1.5.x plugin and Cs-Cart captcha fixing plugin. Plugin installation Steps to install your plugin: • Place your plugin (PHP file) into plugins folder of WEBO Site SpeedUp installation. • Add file name (w/o .php) of your plugin to config.webo.php (option ['plugins'], the last one). • Start installation process. Note that WEBO Site SpeedUp tries to detect plugins automatically basing on current CMS. I.e. with Drupal CMS you can just place file drupal61.php or drupal56.php into plugins — WEBO Site SpeedUp detects this file and applies it during installation to config.webo.php. 74
  73. 4.5. System Files Here is a list of internal libraries

    and WEBO Site SpeedUp files which are being used outside of the core folder. Internal libraries These files are used to provide different parts of WEBO Site SpeedUp functionality locally on the website (WEBO Site SpeedUp can be installed outside document root, so all essential parts must exist inside website folder). wo.static.php Initially it is located inside libs/php/ folder. On installation it is copied to CSS cache directory. It is used to provide gzip / client side caching for appropriate types of files on environments w/o required Apache modules. Well-known 'static proxy' library. 0.gif Initially it is located inside libs/php/ folder. On installation it is copied to CSS cache directory. It is used to replace images with transparent ones on HTML Sprites usage. yass.loader.js Initially it is located inside libs/js/ folder. On installation it is copied to JavaScript cache directory. It is used to provide unobtrusive load for detected pieces of JavaScript code (cross browser onDOMready event). wo.cookie.php Initially it is located inside libs/js/ folder. On installation it is copied to JavaScript cache directory. It is used to check gzip support for browsers which don't send Accept-Encoding headers (.php file sends gzipped JavaScript which sets appropriate cookie). web.optimizer.stamp.png Initially it is located inside images/ folder. On installation it is copied to CSS cache directory. It it used as a water mark for Community Edition (and can be used in any other WEBO Site SpeedUp Edition). 75 Visit our site www.webogroup.com
  74. Achievement files These files are required to display information about

    speedup achievements. webo-site-speedup.back.jpg Initially it is located inside libs/css/ folder. On first visit to Achievements page it is copied to CSS cache directory. It is used to display general (orange) background for Website speedup Achievements page. webo-site-speedup.rocket.png Initially it is located inside libs/css/ folder. On first visit to Achievements page it is copied to CSS cache directory. This file contains all achievements graphics to display final schema with rocket parts. webo-site-speedup88.png On every visit to Achievements page it is re-checked and the last version is downloaded from WEBO Software servers. This file contains tiny (88x88) picture of website speedup achievement. webo-site-speedup125.png On every visit to Achievements page it is re-checked and the last version is downloaded from WEBO Software servers. This file contains small (125x125) picture of website speedup achievement. webo-site-speedup161.png On every visit to Achievements page it is re-checked and the last version is downloaded from WEBO Software servers. This file contains medium (161x161) picture of website speedup achievement. webo-site-speedup250.png On every visit to Achievements page it is re-checked and the last version is downloaded from WEBO Software servers. This file contains large (250x250) picture of website speedup achievement. webo-site-speedup.php On every visit to Achievements page it is re-generated to the actual state. This file contains all HTML part of website speedup achievement page. 76
  75. webo-site-speedup.css On every visit to Achievements page it is re-generated

    to the actual state. This file contains all CSS (mhtml) part of website speedup achievement page. Temporary files These files don't usually present in any of website folders, but sometimes they can be found while WEBO Site SpeedUp is operating. progress.html Can be found inside JavaScript cache directory. Contains current stage of optimization or file number for update process. htaccess.test Can be found inside JavaScript cache directory. Contains (zero) content of libs/php/css.sprites.php file (being downloaded through curl it returns no content). If this file contains some text (Apache error), .htaccess usage is possible for current website. Usually check for .htaccess possibility with this procedure causes access warning inside log files. It is OK. module.test Can be found inside JavaScript cache directory. Contains content of libs/js/wo.cookie.php, libs/js/yass.loader.php, or libs/js/yass.loadbar.js files (it depends on current testing module). It is used to check possible usage of Apache modules (if apache_get_modules returns nothing). 77 Visit our site www.webogroup.com
  76. 4.6. Configuration Algorithm Automatic tuning — Environment test 1. Disable

    WEBO Site SpeedUp and all its options (for correct options configuration w/o any losses in website functionality). ◦ Enable "Add <!--WSS--> to body of optimized pages". 2. Client side caching (Cache-Control and Expires headers setting to far future to cancel repeat requests to static assets from browsers). • Enable "Cache CSS". • Enable "Cache JavaScript". • Enable "Cache images". • Enable "Cache fonts". • Enable "Cache video". • Enable "Cache other files". • Server side caching (server side expenses elimintation to create HTML pages). • Check current server side delay for home page (if curl library exists). • Enable Server Side Caching (if WEBO Site SpeedUp is installed natively and delay is more than 500 ms). • .htaccess test (Apache modules usage for client- and server-side optimization). • Check for SymLinks possibility. • Load available Apache modules. • mod_gzip • mod_deflate (+ mod_filter) • mod_expires • mod_headers • mod_rewrite • mod_mime • Enable available modules via .htaccess. • Check if website is accessible (if curl library exists). • If website is not accessible disable all Apache modules. Automatic tuning — CSS optimization 1. Files merging (decrease of requests to CSS files). • Count number of tags (actually styles) <link> and <style> inside <body>. • If number of styles greater than 0, then enable "Combine CSS included in tags 78
  77. <head> and <body>" • Otherwise enable "Combine only CSS included

    in tag <head>" • Enable "Enable inline styles merging" • Enable "Enable external styles merging" (if curl library exists). • Compare styles for optimized and intiial website home page. • Disable "Enable inline styles merging" if styles are different • Compare styles once more, disable "Enable external styles merging" if they are different. Compare styles once more, disable "Combine only CSS included in tag <head>" if they are different. • Minify (decrease CSS code size). • Enable "Minify CSS". • Compare styles, disable "Minify CSS" if styles are different. • Gzip (decrease CSS code size). • Enable "Gzip CSS". • Compare styles, disable "Gzip CSS" if styles are different. Automatic tuning — JavaScript Optimization 1. Files merging (decrease of requests to JavaScript files). 2. Enable "Combine only JavaScript included in tag <head>". • Load website home page once more and compare inline JavaScript code in head section with the previous one. • Enable "Enable inline JavaScript merging" if inline code is the same in both cases. • Enable "Enable external JavaScript merging" (if curl library exists). • Enable "Force moving combined script to </head>". • Count JavaScript errors on the optimized home page. • Disable "Enable inline JavaScript merging" if any errors exist. • Count errors once more. Disable "Force moving combined script to </head>" if there are any. • Count errors once more. Disable "Enable external JavaScript merging" and enable "Force moving combined script to </head>" if there are any. • Count errors once more. Consequently add to "Exclude file(s) from combining" option JavaScript files from initial web page. • Count errors once more. Disable "Combine only JavaScript included in tag <head>" if there are any. • Minify JavaScript files (decrease of JavaScript code size). • Enable "Minify with JSMin". • Count JavaScript errors on the optimized home page. 79 Visit our site www.webogroup.com
  78. • Disable "Minify with JSMin" and enable "Minify with YUI

    Compressor" if there are any. • Count errors once more. Disable "Minify with YUI Compressor" and enable "Minify with Packer". • Count errors once more. Disable "Minify with Packer" if there are any. • Duplicates removal (decrease of JavaScript code size). • Check for JavaScript libraries duplicates on initial page. • Enable "Remove duplicates" if there are any. • Count JavaScript errors on the optimized page. • Disable "Remove duplicates" if there are any. • Gzip (decrease of JavaScript code size). • Enable "Gzip JavaScript". • Count JavaScript errors on the optimized page. • Disable "Gzip JavaScript" if there are any. Automatic tuning — HTML Optimization 1. Minify (descrease of HTML code size). • Enable "Minify HTML". • Check for HTML changes (DOM tree size for head and length of inline JavaScript inside body) for the optimized and initial web pages. • Disable "Minify HTML" if there are any changes. • HTML comments removal (decrease of HTML code size). • Enable "Remove HTML comments". • Check for HTML changes for the optimized and initial web pages. • Disable "Remove HTML comments" if there are any changes. • Gzip (decrease of HTML code size). • Enable "Gzip HTML". • Enable "Gzip fonts". • Enable "Check for gzip possibility via cookies". • Enable "Use deflate instead of gzip for IE6/7". • Load the optimized page and try to read its contents. • Disable "Gzip HTML", "Gzip fonts", "Check for gzip possibility via cookies", and "Use deflate instead of gzip for IE6/7" if can't read contents. Automatic tuning — Performance 1. Validate changse in files (decrease optimization expenses). 2. Enable "Ignore file modification time stamp (mtime)". • Enable "Do not use regular expressions". 80
  79. • Check for HTML changes for the optimized and initial

    web pages. • Disable "Do not use regular expressions" if there are any changes. Automatic tuning — data:URI 1. Background images (decrease in HTTP requests number). • Enable "Apply data:URI". • Enable "Apply mhtml". • Enable "Separate images from CSS code". • Enable "Load images on DOMready event". • Compare styles for optimized and intiial website home page. • Disable "Apply data:URI", "Apply mhtml", "Separate images from CSS code", and "Load images on DOMready event" if styles are different. • Load the second CSS file (with background images) from the optimized web page and get its size. • Disable "Separate images from CSS code" and "Load images on DOMready event" if file size less than 102400 bytes. Automatic tuning — CDN 1. JavaScript files distribution (increase in requests concurrency). • Get JavaScript host from initial website page with the website host. • Set "Host for JavaScript file(s)" and enable "Distribute JavaScript files" if calculated host differs from website host (and it is a subdomain). • CSS files distribution (increase in requests concurrency). • Get CSS host from initial website page with the website host. • Set "Host for CSS file(s)" and enable "Distribute CSS files" if calculated host differs from website host (and it is a subdomain). • Images distribution (increase in requests concurrency). • Get images host(s) from initial website page with the website host. • Set "Allowed hosts" and enable "Distribute images" if calculated host(s) differ(s) from website host (and it/they is/are subdomain(s)). Automatic tuning — HTML Sprites 1. HTML Sprites (decrease of HTTP requests). 2. Get number of small images on the initial website page which size is less than 16x16. • Enable "Combine HTML images", "Combine images for the current page only", and set "Maximum width and height of HTML images" to 16 if there are more 81 Visit our site www.webogroup.com
  80. than 2 such images. Automatic tuning — Unobtrusive JavaScript 1.

    Nonblocking JavaScrupt (acceleration of page rendering with JavaScript calls movement). 2. Enable "Move all JavaScript code to </body>". • Count JavaScript errors on the optimized home page. • Disable "Move all JavaScript code to </body>" if there are any. • Unobtrusive JavaScript (acceleration of page rendering). • Get the number of known (supported) widgets on the initial website page. • Enable "Move JavaScript widgets calls before </body>" if there are any widgets. • Get the number of known (supported) ads on the initial website page. • Enable "Move advertisement calls before </body>" if there are any ads. • Get the number of frames which are not widgets or ads. • Enable "Defer iframes loading" if there are any frames. 82
  81. 4.7. Unobtrusive JavaScript patterns All patterns for delayed JavaScript loading

    (to prevent its blocking behavior) are located inside libs/php/config.unobtrusive.php file in WEBO Site SpeedUp core. So you can add new patterns (or even delete old ones) if you want. Pattern description Each pattern has 7 parameters: • Group (it is used just to fit corresponding configuration option). • Identifier (must be unique, used for ID of source/destination layout blocks). • Marker (short string in HTML code to decide apply regexp pattern or not). • Regexp (the main pattern to move JavaScript chunk from its initial place to the end of the document). • Onload_before (regexp match pattern to match JavaScript code chunk to apply progressive script delaying, to window.onload event). • Onload_after (regexp replace pattern to include matched JavaScript code after onload_before pattern has been applied). • Height (is used to prevent reflow on dynamic content changes of destination container). Examples Delayed JavaScript code Let's take Amazon ads as an example. It has the following unobtrusive pattern: 'aa' => array( 'marker' => 'amazon_ad', 'regexp' => "&lt;script[^>]+>&lt;!--[^\da-zA- Z]*amazon_ad_tag.*?ads.js\">&lt;/script>" ) How it works? If HTML document matches amazon_ad string, regular expression (regexp) is applied to the whole document to find all JavaScript code examples. Then all these code chunks are consequently replaced with (destination containers, aa is a unique block identifier through all the other patterns) and at the end of HTML document corresponding chunks are included into (source containers). After the whole JavaScript code (from the current chunk) has been loaded into source container its content (maybe be a lot of code) is moved to destination container. There are no changes in layout if height parameter is given - only dynamic (usually advertisement) content appears within given container. As the result we have no blocking JavaScript, but all 3rd party content (which is supported by patterns in configuration) is loaded correctly. 83 Visit our site www.webogroup.com
  82. In the most of cases this unobtrusive logic is enough

    to guarantee significant website speedup and remove any blocking JavaScript. Progressive JavaScript movement If you want to delay for example Google Search widget to window.onload event you can't simple add this via just an event handler for window.onload. You need to emulate document.write behavior to create a correct DOM structure with the given widget code. For this purpose two advanced parameters are used: onload_before and onload_after. Let's take this example: 'gs' => array( 'marker' => 'setOnLoadCallback', 'regexp' => "&lt;script src=\"https?://www.google.com/jsapi\" type=\"text/javascript\">" . "[\r\n\s\t]*&lt;/script>[\r\n\s\t]*&lt;script type=\"text/ javascript\">(//\s*<!\[CDATA\[)?" . "[\r\n\s\t]*google\.load\(['\"]search.*?&lt;/script>", 'onload_before' => '.*?google.load\(\s*[\'"]search[\'"](.*?)\);(.*?)google.setOnLoadCallback[' . '\r\n\s\t]*\(function\(\)\{(.*?)\},\strue\);(.*?)&lt;/ script>', 'onload_after' => 'document.write(\'\x3cscript src="//www.google.com/jsapi" type="text/javascript">' '\x3c/script>\');setTimeout(function(){if(typeof google!=="undefined"&&typeof google.load!==' . '"undefined"){google.load("search"$1);setTimeout(function(){if(typeof google.search!=="undefined"' . '&&typeof google.search.CustomSearchControl!=="undefined"){$2$3$4;setTimeout(function() . 'var a=document.forms,b=0,c;while(c=a[b++]){if(c.className=="gsc- search-box"){wss_onload_ready=1}}' . 'if(!wss_onload_ready){setTimeout(arguments.callee,20)}},20)}else{set . ',10)}else{setTimeout(arguments.callee,10)}},10);' ) Both regexps are used this way $document = preg_replace("@" . $onload_before . "@is", $onload_after, $document); So you can set any regexp groups (inside the first regexp, onload_before) to include them into the result code (which will be placed to the end of the document). Also please be careful with dynamic logic, and use setTimeout to define if all required libraries have been loaded, and callback can be applied. 84
  83. JavaScript variable wss_onload_ready must be set to 1 after the

    whole code is loaded (to start the next dynamic block loading). It is required to make document.write emulation perform correctly. 85 Visit our site www.webogroup.com
  84. 5. Troubleshooting and Support Use Firebug extension for Firefox (or

    similar tools) to view pages source, objects loading diagram, request and response headers etc. This data will help you to acquire information on WEBO Site SpeedUp activity on your website. If you stumbled across a problem during WEBO Site SpeedUp installation or operation refer to one of the following sections: • Installing issues • Client-side issues • Server-side issues If none of these sections helped you resolving your issue please refer to technical support section. 86
  85. 5.1. Installing issues Files or directories are not writable For

    normal operation of WEBO Site SpeedUp, certain files and directories should be writable. • File index.php in website root directory. This file often contains calls which integrates WEBO Site SpeedUp with the system. • File .htaccess in website root directory. If this file does not exists, website root directory itself should be writable in order to create .htaccess file. This file contains important Apache instructions which are necessary for many of the WEBO Site SpeedUp features. • Directory, where WEBO Site SpeedUp is installed with all its files and subdirectories. WEBO Site SpeedUp updates gets installed in this directory, user settings are stored here as well. • Directory where HTML, CSS and JavaScript cache files are located with all their files and subdirectories. These directories contains optimized files — the result of WEBO Site SpeedUp work. By default they are placed in WEBO Site SpeedUp installation directory, but their placement could be changed by user. Website is broken but WEBO Site SpeedUp is disabled or even uninstalled Invalid .htaccess Instructions In the root directory of a website there is an .htaccess file which is often modified when WEBO Site SpeedUp is installed. There is also copy of original file named .htaccess.backup. Restore the original file or make sure that there are no Site SpeedUp instructions left in .htaccess file. Such instructions are surrounded by two lines like this: [some instructions] Client Side or Server Side Cache is Active Cached pages can refer to nonexistent resources or just contain outdated code which can make website look broken. Find all active caching solutions on a website and clear their cache to make sure that you seeing the actual but not cached pages. Restoring Password for WEBO Site SpeedUp If WEBO Site SpeedUp is installed as a standalone application, open its installation directory and find a file named config.webo.php. Empty the password parameter value on a line 7 like this: 87 Visit our site www.webogroup.com
  86. $compress_options['password'] = ""; Open WEBO Site SpeedUp admin interface afterwards

    and enter your registration data once again. Configuration settings and cache files will be preserved. If WEBO Site SpeedUp is installed as a native plugin, password can be restored using any system specific methods. WEBO Site SpeedUp activity If you need to check whether WEBO Site SpeedUp works on the website or not (if its installation does HTML document parsing) you can just open raw HTML code of your website and find there string <!--WSS--> (starting from version 0.9.0). WEBO Site SpeedUp doesn't parse content if there is no such string (also it can be disabled in configuration, please be careful with such stuff). For earlier versions you can check HTML document for absence of tabulations at the start of strings, absence of double line breaks or some file names in head section (like cache/1234a6789b.css or cache/1234c6789d.js, where 1234c6789d is a random string in hex16). It seems WEBO Site SpeedUp doesn't work if there are no such sings. If you can't find any traces of WEBO Site SpeedUp you need to re-check its calls in files of your CMS and maybe also repeat WEBO Site SpeedUp installation (WEBO Site SpeedUp can apply all required changes to CMS files by automatically). To get information about required changes for a standalone installation you can open System Status page and go to _Instal & Uninstall& tab. Also you can check in WEBO Site SpeedUp is active in the configuration (all installations except Joomla! plugin). For this purpose you should check in the file web-optimizer/config.webo.php this string $compress_options['active'] = "1"; And set value to 1 (if it's 0). This will activate WEBO Site SpeedUp for your website. If this doesn't help please check if there are any other plugins which can gzip content (so WEBO Site SpeedUp can receive it in gzipped view, and don't parse). Try to disable gzip in every such plugin or system configuration if it can affect HTML code. Incorrect paths calculation Sometimes WEBO Site SpeedUp can't correctly calculate all default paths for correct installation (this can result in no styles or scripts on the website, or even in any PHP fatal error). Usually it appears on CGI environments. To calculate paths WEBO Site SpeedUp tries the following. • Detects document root. Usually it's defined as $_SERVERno document root is defined (or it's defined to a not accessible folder) WEBO 88
  87. Site SpeedUp tries to get environmental variable SCRIPT_FILENAME and exclude

    from it another variable SCRIPT_NAME (usually this helps in detection). • In case of relative website installation (i.e. a folder inside document root) WEBO Site SpeedUp has an option for website root. Usually it's computed automatically. • If CGI environment has been set completely incorrectly (i.e. $_SERVER['DOCUMENT_ROOT' isn't defined, and environmental variables SCRIPT_NAME, SCRIPT_FILENAME` are defined regarding internal PHP process) WEBO Site SpeedUp fails to detect document root, so it can't set all other directories (in most of cases they are also computed automatically after document root). In the last case you need to setup all paths manually. This can be done through WEBO Site SpeedUp interface, usually all paths are listed as the first parameters to set. 89 Visit our site www.webogroup.com
  88. 5.2. Client-side issues Please note! After each modification you need

    to refresh cache to apply new configuration settings. Browser error or strange symbols instead of website or content encoding error Usually it relates to double gzipping of the HTML document. The first can be performed by WEBO Site SpeedUp, and the second - by CMS or by web server. To resolve this issue you need to disable gzip in CMS or in WEBO Site SpeedUp: Gzip -> Gzip HTML -> No White screen instead of website or too long delay The main trouble was related to CSS Sprites behavior (memory limit issues), it is resolved in versions 0.5+ (so if you are using older versions - just upgrade). In any case you can try to completely disable CSS Sprites: CSS Sprites -> Apply CSS Sprites -> No and then step-by-step increase maximum width and height of images CSS Sprites -> Maximum width and height of images (in pixels) -> 100 ... 900 or exclude a number of files from merging CSS Sprites -> Exclude files from CSS Sprites -> List of files separated by space Also try to disable HTML images combining: CSS Sprites -> Combine HTML images -> No Also you can check your web server error logs to find out what is the problem. Usually it is enough to add required fixes. Sometimes white screen refers to incorrect installation or double gzipping. Upper sections tell how to resolve these troubles. If you still can't resolve this trouble you can disable WEBO Site SpeedUp options one-by-one to find out the right combination or the clue. You should start with the main groups of settings - Combine CSS, Combine JavaScript, Minify, and Gzip - and move forward in enabling more detailed settings (i.e., Client side cache, .htaccess, data:URI, or CSS Sprites). 90
  89. Incorrect design This can be caused by different issues, but

    you can start with disabling CSS Sprites: CSS Sprites -> Apply CSS Sprites -> No Then (if the situation isn't resolved) you can disable data:URI: Data:URI -> Apply data:URI -> No After disabling this option CSS files won't be parsed by CSS Tidy and will be just merged together (and simple optimization will be applied). If there are still some issues with design you can disable inline CSS styles merging inside head Combine CSS -> Enaable inline styles merging -> No or(and) external CSS files Combine CSS -> Enaable external styles merging -> No or minify for CSS files Minify -> Minify CSS files -> No If you have time and want to research trouble more you can disable merging CSS files inside head one-by-one with the setting: Combine CSS -> Exclude CSS file(s) from merging -> List of files separated by space So you can find files that cause incorrect WEBO Site SpeedUp behavior and just exclude them from optimization process (or make them standard-complaint with jigsaw.w3.org/css-validator/ and try once more). At the bottom line there is an option Combine CSS -> Include CSS code to all files which you can use to add any custom CSS code to the merged file and overwrite current calculated styles. This can guarantee elimination of any CSS merging troubles. Disappeared or broken background images In some cases installation WEBO Site SpeedUp can result in disappeared or broken background images. To resolve this issue you need to detect what initial background images cause incorrect WEBO Site SpeedUp behavior (using and tools to debug markup) and exclude them from the CSS Sprites creation: CSS Sprites -> Exclude files from CSS Sprites -> List of files separated by space If this doesn't resolve the trouble you can disable CSS Sprites: 91 Visit our site www.webogroup.com
  90. CSS Sprites -> Apply CSS Sprites -> No Also it's

    possible you should use this option Combine CSS -> Include CSS code to all files to define styles more precisely because you may have some troubles with this option data:URI -> Separate images from CSS code Unavailable scripts, styles or images while using client-side caching and nginx WEBO Site SpeedUp has two ways to override client cache: • Using GET-parameters, like: 3a1a23c4ea.js?wo1285789196. In this case some proxy servers can ignore such GET-parameters and still serve older cached files. • Using filename suffixes, like: 3a1a23c4ea.wo1285789196.js. This is most recommended way but all requests for files with such suffixes should be redirected to real existing files. And as long as nginx does not support dynamic changes in its configuration, WEBO Site SpeedUp cannot create all necessary redirect rules automatically. There are several ways to solve this problem: • Disable .htaccess → Use mod_rewrite. First approach with unique GET- parameters will be used. • Disable .htaccess → Use mod_expires (if client-side caching is enabled in WEBO Site SpeedUp) or .htaccess → Use mod_deflate (if gzip compression is enabled in WEBO Site SpeedUp). Files extensions will be changed to .php, and compression and caching headers will be applied dynamically, when files are requested and they will will look like this, for example: 3a1a23c4ea.wo1285789196.php. They will be served directly with Apache (using properly working mod_rewrite), bypassing nginx. • Add to nginx configuration all necessary redirect rules as it's performed for Apache .htaccess. They can look like this: rewrite ^(.*)\.wo[0-9]+\.(css|js)$ $1.$2 break; It's recommended to apply client-side caching and compression for static resources utilizing nginx features only. Ideologically this is the most correct approach but it requires manual configuration changes for nginx. Incorrect website behavior Usually it results in disabling part of client side logic. So you should understand that if you have for example a comments form (that is shown by means of JavaScript) and after WEBO Site SpeedUp installation there is no such form, then 92
  91. there are issues with client side logic (JavaScript) and not

    with design itself. You should start resolving this issue with disabling safe merging mode for JavaScript files Combine JavaScript -> Safe combine mode -> No because it can be too safe for your website client side logic (and thus may harm it). To find out the issue you can start with disabling minify for JavaScript files: Minify -> Minify JavaScript files -> Don't minify JavaScript Then (if troubles still occur) you can try to exclude files one-by-one: Combine JavaScript -> Exclude file(s) from combining -> List of files separated by space When you detect which file causes the issue you can just exclude it from the overall packet or try to put logic of this file in non-conflict state (usually such errors are caused by incorrect internal logic inside this file, that isn't erroneous in one environment but leads to conflicts with other environments on merging together with all other files). In addition you can try to exclude inline JavaScript from merging Combine JavaScript -> Enable inline JavaScript merging -> No and place combined JavaScript file in the beginning of the page Combine JavaScript -> Force moving combined script to &lt;/head> - > No Not accessible files for end-users Sometimes there are issues with access to the website from end-users browsers but in the same time there are no troubles in the admin browser. If you face with such issue you need to check where cache folders are located, where WEBO Site SpeedUp is located, and if protection for WEBO Site SpeedUp installation is enabled: System Status -> Settings -> Protect WEBO Site SpeedUp installation via htpasswd -> Yes So you need to move cache folders outside WEBO Site SpeedUp installation (i.e. to the root directory cache, accessible via web server to write into) or disable protection for WEBO Site SpeedUp installation: System Status -> Settings -> Protect WEBO Site SpeedUp installation via htpasswd -> No 93 Visit our site www.webogroup.com
  92. WEBO Site SpeedUp favicon appears on a website WEBO Site

    SpeedUp can put its favicon.ico to the website root directory when it can't find current favicon in that directory, or a link to any favicon in documents sources. This step allows browsers to download the favicon just once and cache it for a long time. Otherwise, if there will be no favicon, browsers will receive 404 errors on every page load. If you want to get your own favicon, just delete WEBO Site SpeedUp favicon.ico (and its gzipped favicon.ico.gz version) from the website root directory. Browsers will update their cache after a while and you won't notice WEBO Site SpeedUp favicon again. 94
  93. 5.3. Server-side issues Server-side resources consumption by WEBO Site SpeedUp

    There are three common situations and each results in different load on your system. • WEBO Site SpeedUp is installed but disabled (i.e. in debug mode). There is no additional load to your system at all. • WEBO Site SpeedUp is enabled and its cache is full. The load is minimal, almost insignificant, around 5 or 10 milliseconds. • WEBO Site SpeedUp is enabled and its cache is not full. The load can be minimal to significant. Exact amount of server expenses depends on server environment and WEBO Site SpeedUp configuration. This situation is clearly described below. So if you are experiencing heavy load for a CPU or memory, and WEBO Site SpeedUp cache was just refreshed, please wait for some time. In most cases it will take no more than one hour until all necessary cache files are created and served without extra load to your system. That is the natural result when users or search bots are browsing your website for some time. If cache was refreshed long time ago, and the load is still high, then probably some cache files are being created on every page view. You can easily track this situation by examining Cache tab on System Status page. If cache size is growing with every page view, then perhaps some WEBO Site SpeedUp options causing such behavior. For example, when every page has unique set of JavaScript code, WEBO Site SpeedUp is forced to create a new cache file for every page if the Combine all JavaScript option is enabled. If every JavaScript file should be minimized after that, the load will be even higher. In this situation you can, for example, exclude some files from combining or switch to _Combine only JavaScript in head tag_ option or you can exclude inline code from combining, depending on where the problem code is located. Another similar example is when every page has unique set of images and Combine HTML images option is enabled. Here is a list of options which may cause such troubles. WEBO Site SpeedUp options which usually cause extreme resources usage: • (Performance) Ignore file modification time stamp (mtime), if disabled • (Combine CSS) Combine all CSS in tags <head> and <body> • (Combine JavaScript) Combine all JS in tags <head> and <body> • (Minify) Minify with YUI Compressor • (Minify) Compress HTML to one string 95 Visit our site www.webogroup.com
  94. Other WEBO Site SpeedUp options which usually cause significant resources

    usage: • (Performance) Do not use regular expressions, if disabled • (Performance) Restore CSS properties • (Unobtrusive JavaScript) Move all JavaScript code to </body> • (Unobtrusive JavaScript) Move JavaScript widgets calls before </body> • (Unobtrusive JavaScript) Move advertisement calls before </body> • (Unobtrusive JavaScript) Move counter calls before </body> • (Unobtrusive JavaScript) Defer iframes loading • (CSS Sprites) Apply CSS Sprites • (CSS Sprites) Combine HTML images Also if you have a lots of images, CSS or JavaScript assets (i.e. hundreds of them), every page view will result in high server-side load if the following options are enabled: • (CDN) Distribute images • (CDN) Distribute CSS files • (CDN) Distribute JavaScript files If you have failed to find WEBO Site SpeedUp options which drops down your server performance, create a new configuration and enable optimization options one by one to find out the bottleneck of the current configuration. Still no solution? Try to disable WEBO Site SpeedUp and check server side performance again to make sure that the problem is not caused by some other software or system plugins. No support for multiple hosts If you want to enable multiple hosts to server your images you need to check the following: • Enable support in DNS for these hosts. So you need to write to DNS a number of records with these hosts pointing to the required IP address (usually the same as for the current website). • Enable support for these hosts on your server. For Apache you do this with ServerAlias directive, i.e.: ServerAlias i1.site.com ServerAlias i2.site.com • Check that these hosts are mirroring the main website. For this you need to open any static object on the website (for example site.com/images/my.png) and replace the host with every host from the list of enabled ones (i1.site.com/images/my.png and i2.site.com/images/my.png). If you have any troubles you need to re-check or repeat previous steps. • Add all hosts to WEBO Site SpeedUp configuration: Multiple hosts -> Allowed hosts -> List of hosts separated by space 96
  95. • And enable support for multiple hosts: Multiple hosts ->

    Enable multiple hosts -> Yes WEBO Site SpeedUp will automatically check some of the most used hosts and try to apply them for images' distribution. So the last setting maybe performed automatically during WEBO Site SpeedUp install. After all these actions all images will be server through multiple hosts that will significantly increase load speed of every page on the website. Multiple hosts aren't saved WEBO Site SpeedUp checks all entered hosts automatically to be sure that they perform as they should. You can disable this check (if it can't be performed properly): Multiple hosts -> Check hosts' availability automatically -> No Server resources are very limited In this case you can use chained optimization: • Download home page (raw HTML) into cache directory as compressing.php. • Include into compressing.php WEBO Site SpeedUp calls. • Redirect to compressing.php with GET parameter (web_optimizer_stage). • Compressing.php redirect before merging CSS Sprites, after p16 in CSS Spites logic (repeat-x, repeat-y, no-repeatb, no-repeatr), after all CSS Sprites are ready and after data:URI are ready (total 5 redirects). • Remove compressing.php. • Update existing index.php (all cached files are already exist). 97 Visit our site www.webogroup.com
  96. 5.4. Technical support Please try to resolve your problem with

    troubleshooting sections first. If your problem is not described there, try to search you issue in a project issues list. Most likely, your problem is well known and will be solved in one of the nearest updates. If you did not found description of your problem there, feel free to report it via New issue form (Google account is required). All severe issues are closed in about one day (usually just several hours). Please, create separate issues for each unsolved problem you have. Customers who have purchased Premium Support 24/7 can also resolve their problems in interactive mode using our contact information. 98