PHP-Speedy, utility per velocizzare il tuo sito
PHP-Speedy è un programma di compressione per siti costruiti in php, utilissimo per velocizzare automaticamente il caricamento delle pagine web.
In pratica php-speedy comprime i css, gli script Java e tante altre cose. E’ munito di programma di installazione, tutto in lingua inglese, non necessita di db sql, ma solo di una cartella scrivibile, qualche mb di spazio e una piccola modifica al file index.php
Ecco una demo: pagina senza compressione e la stessa compressa.
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();
Commenti
Posta un commento