Let's talk

s.m.a.r.t digital marketing

Leverage Browser Caching

You are here:

Leverage Browser Caching

1. Browser caching stores webpage resource files on a local computer when a user visits a webpage.
2. “Leveraging” browser caching is when a webmaster has instructed browsers how their resources should be dealt with.

Two way to leverage Browser Caching

1. Change the request headers of your resources to use caching.
2. Optimize your cache by using plugins.
Change the request headers through .htaccess file
Add the following code into .htaccess file

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”


Was this article helpful?
Dislike 0
Views: 81