Step1:
Apache's mod_expires module allows settings by file type to control how
long browsers cache files. This is useful for ensuring browsers cache
image, Javascript and/or CSS files without making additional unnecessary
requests when loading pages.
Step2:
You will need to edit your .htaccess file. Add the following code to the file and
save it.
The timeframe should be one of years, months, weeks, days, hours, minutes or seconds.
Here's an example from one of my sites:
ExpiresActive on ExpiresByType application/javascript "access plus 1 months" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 months"
Step3:
Enjoy Folks
No comments:
Post a Comment