How to force browser cache on my website?

Issue:

When you check your website using http header tools you can see that your website is not optimize.

Reason:

You find that your website is not optimize and you have check with webpage tester that your website is does not have caching enable.

Solutions:

You may force your website to use caching that has been ready by our web server. Please add below script into your .htaccess file:

ExpiresActive On
ExpiresDefault A1800

#   1 Week
<FilesMatch "\.(ico|gif|jpg|jpeg|png|flv|ttf)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
#   1 Week
<FilesMatch "\.(js|css|pdf|txt|swf)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
#   1 Hour
<FilesMatch "\.(html|htm|php|php3|)$">
Header set Cache-Control "max-age=3600"
</FilesMatch>

Was this answer helpful?

Also Read

My images are broken, or don't show up!

Firstly, check to see whether they are uploaded to our server and are in the correct...

How do I install Joomla?

Download the latest stable of Joomla release from http://www.joomla.org/download.html. Unzip...

How to register Affiliate?

1)      Login into your account on our website. 2)      Select “Affiliates”. 3)      Click...

Common SEO Tips and Tricks

Include a title tag on all of your pages. Include a meta description tag on your homepage...

How to install WordPress by using Plesk

Step 1 Login to the Plesk Panel. Then, from the hosting servers menu that located in the left,...