PHP Load TImes

From CTWUG Wiki
Jump to: navigation, search

For all those that host web server on the ctwug network please make sure that you setup the content expire headers for static content such as css,js,gif,jpg,extra files were their content will probably never change for weeks on hand.

The benefits are:

Reduced bandwidth usage and load on the whole ctwug network, because these files are not load from the server for every page.

Ex-termly faster load and rendering of web pages on the clients side browser, even when the network is under load.

The process is pretty simple for php server. Create a file with the name of .htaccess in the root directory hosting directory usually the wwwroot, httpdocs folder if it doesn't exist already. Then edit that file with a text editor.

Append the following code to the file and save:


<FilesMatch ".*\.(ico|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Cache-Control "max-age=14515200, public" </FilesMatch>


You can use http live headers plugin for firefox to check if it is work. http live headers download