Many webmasters,want to improve their website loading speed to enhance their visitors’ experience. Many of you, who are using a host which do not give you .htaccess to perform gzip compression on your data stream, can now have an effective solution for that.
a website script giving you the power to do such as thing. The script which does this great job is called PHP Speedy.PHP Speedy is a script that you can install on your web server to automatically speed up the download time of your web pages. PHP Speedy automatically joined together all the appropriate files and compressed them, greatly reducing the load time of the page.
http://aciddrop.com/2008/01/21/boost-your-website-load-time-with-3-lines-of-code/
The script does all of the following:
Make fewer HTTP requests
Add a far-future expires header
Gzip your page’s components
Minify your JavaScript, CSS and HTML
First you need to download the script.
http://aciddrop.com/aciddrop/minify-0.3/aciddrop_site_compression-0.3.zip
Download file with Script And Demo Page.
http://aciddrop.com/aciddrop/minify-0.3/aciddrop_site_compression-0.3.1.zip
Then you need to place this piece of PHP code at the start of your page:
***********************************
PHP:
require_once('class.compressor.php'); //Include the class. The full path may be required
$compressor = new compressor('css,javascript,page');
*********************************************************
Then this one at the botton of the page:
****************************
PHP:
$compressor->finish();
******************************
you can check out the test pages here:
web-site speed boost test page WITH compression
http://aciddrop.com/aciddrop/minify/
web-site speed boost test page WITHOUT compression
http://aciddrop.com/aciddrop/minify/compress_me.php?compress=no
For webmasters starting out, make sure your template already has the code! If you have a wordpress blog, you might be happy to know that a plugin has been released for it which implements PHPSpeedy on it. Click below to know more. Happy coding!
http://aciddrop.com/2008/03/07/php-speedy-wordpress-plugin-preview-release/
According to Yahoo’s YSlow Firefox Plugin, the demo page whcih had a ranking of F(45) improved to a ranking of A(97).
Requirements
A server running at least PHP4. For JavaScript minification to work as well, PHP5+ is required.
You should set the folder where you are running the class from as writable
Download
You can download PHP Speedy from this link:http://aciddrop.com/aciddrop/download/php_speedy_wp_0.5.2.zip
Installation - via auto-install
In order to install PHP Speedy you should:
Download and unzip the PHP Speedy package into its own directory
Point your browser to the PHP Speedy directory
Follow the installation instructions
Installation - manual
If you prefer to manually install things:
Download and unzip the PHP Speedy package into its own directory
Delete the index.php and install.php files
Open config.php
Fill in the blanks for the variables (apart from username and password). You might enter something like this:
$compress_options['document_root'] = “/home/my_site/public_html”;
$compress_options['javascript_cachedir'] = “/home/my_site/public_html/aciddrop/php_speedy/”;
$compress_options['css_cachedir'] = “/home/my_site/public_html/aciddrop/php_speedy/”;
$compress_options['minify']['javascript'] = “1?;
etc
Make sure the directories you specified for the cachedirs are writable
For the GZIP, minify and expires options 1 is on and 0 is off
Open the php file that controls the output of HTML that you will be compressing. This might be something like index.php. Include the php_speedy.php file at the very top, i.e like this:
require(’/home/my_site/public_html/aciddrop/php_speedy/php_speedy.php’);
Add this code at the very bottom $compressor->finish();
Source:
http://codefusionlab.co.cc/boost-you-website-speed-by-500-with-3-lines-of-code/
php speedy
http://aciddrop.com/
wordpress plugins: http://aciddrop.com/2008/03/07/php-speedy-wordpress-plugin-preview-release/
php speedy: http://aciddrop.com/php-speedy
http://aciddrop.com/2008/01/23/site-speed-boost-script-updated/


LinkBack URL
About LinkBacks




Reply With Quote


