Making your website load faster using PHP

Hi everyone, I came across a php script that you can make your pages load faster by combining & compressing javascript and css files. Here’s a link to the original source:

http://rakaz.nl/2006/12/make-your-pages-load-faster-by-combining-and-compressing-javascript-and-css-files.html

But my question is how do I know if its working? In the root directory I have a .htaccess file and pasted in the following code:


RewriteEngine On
RewriteBase /
RewriteRule ^css/(.*\\.css) /combine.php?type=css&files=$1
RewriteRule ^js/(.*\\.js) /combine.php?type=javascript&files=$1

Not sure if the paths are correct, but this resides in the root directory so does a folder called portfolio which contains all 3 folders needed to make this script work, cache, css, and javascript. As for performance I can’t really tell to make a difference. Thanks for any help.

Check the site with http://www.webpagetest.org/ Ideally, You should see the difference in the load times.

nice topic, but the following website ( http://www.webpagetest.org/ ) doesn’t open

With Firefox and the Web Developer Toolbar load your page and from WDT go to Information > View Document Size to see the over-the-wire and uncompressed sizes.

Hm, I’m not really sure if its working. I’m using godaddy and it didn’t have anything like .htaccess but I created it anyways, perhaps that could be the problem?