How can you speed up your site on an Apache PHP server? Piece of cake if you ask me. How simple is it? With some copy and paste jobs from my article you can speed up your site significally.
Follow these simple and easy steps to make your site faster today!
AddHandler application/x-httpd-php .js php_value auto_prepend_file ../gzip/gzip-js.php php_flag zlib.output_compression On
Then, make the gzip-js.php file in the /gzip/ directory you’re making to do this, and paste this php code in it: (assuming you have a php server)
There you’ve done it! Next step: set an expires header to the rest of your content.
A first-time visitor to your page will make several HTTP requests to download all your sites files, but using the Expires header you make those files cacheable. This avoids unnecessary HTTP requests on subsequent page views. Expires headers should be used on all components including scripts, stylesheets, and Flash components.
Put these lines of code in your root .htaccess file.
172800 == 48 hours if my math is correct.
Or put this in your httpd.conf file (preferable).
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT" </FilesMatch>
Remember these .htaccess tips are for apache servers only, and you may want to install mod_header and mod_expires on your web server.