.htaccess speed up site

Increase your page load times and save bandwidth with easy and really effective methods using apache htaccess directives. This module controls the setting of the Expires HTTP header and the max-age directive of the Cache-Control HTTP header in server responses. The expiration date can set to be relative to either the time the source file was last modified, or to the time of the client access.
These HTTP headers are an instruction to the client about the document’s validity and persistence. If cached, the document may be fetched from the cache rather than from the source until this time has passed. After that, the cache copy is considered expired and invalid, and a new copy must be obtained from the source.

[ad code=4]

# Please copy this into existing file:
# /var/www/vhosts/domain.com/httpdocs/.htaccess
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A300
ExpiresByType image/x-icon A2592000
ExpiresByType application/x-javascript A3600
ExpiresByType text/css A3600
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpeg A604800
ExpiresByType text/plain A300
ExpiresByType application/x-shockwave-flash A604800
ExpiresByType video/x-flv A2592000
ExpiresByType application/pdf A300
ExpiresByType text/html A300
</IfModule>
#
#

TIME CHEAT SHEET
300 5 MIN
600 10 MIN
900 15 MIN
1800 30 MIN
2700 45 MIN 3600 1 HR
7200 2 HR
36000 10 HR
39600 11 HR
86400 24 HR 86400 1 DAY
172800 2 DAY
259200 3 DAY
518400 6 DAY
604800 7 DAY 604800 1 WEEK
1209600 2 WEEK
1814400 3 WEEK
2419200 4 WEEK
.
2419200 1 MONTH
4838400 2 MONTH
7257600 3 MONTH
14515200 6 MONTH
29030400 12 MONTH

Leave a comment