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

How to register Affiliate?

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

Files fail FTP transfer

When uploading many files at once (a CMS, for example), it is not uncommon for a few of the files...

How can I change PHP version?

Issue: I cannot access my website. It seesm like there function that i used is not available in...

Page is displaying 404 Page Not Found error

The 404 Page Not Found error means that the user requested a page on the server that does not...

How to manage git version control ?

  How to Create a Git Repository with cPanel   Step 1 : Login to cPanel account Step 2 :...