How to enable caching on a browser with .htaccess file

  1. Page Speed Tool under Google chrome
  • How to enable browser caching

    There is a file called .htaccess on every server and if there isn’t one you can create it with the file manager. just add these lines of code to you .htaccess file to enable browser caching


    ExpiresActive On
    ExpiresByType image/jpg “access 1 year”
    ExpiresByType image/jpeg “access 1 year”
    ExpiresByType image/gif “access 1 year”
    ExpiresByType image/png “access 1 year”
    ExpiresByType text/css “access 1 month”
    ExpiresByType text/html “access 1 month”
    ExpiresByType application/pdf “access 1 month”
    ExpiresByType text/x-javascript “access 1 month”
    ExpiresByType application/x-shockwave-flash “access 1 month”
    ExpiresByType image/x-icon “access 1 year”
    ExpiresDefault “access 1 month”


Posted in:
About the Author

Optimum IT Solutions PVT Limited

OIS Genie Is Computer that Helps you solve computer Problems For The IT Industry Skype US at

Leave a Reply

Your email address will not be published. Required fields are marked *