How to Leverage Browser Caching

Leverage Browser Caching to make your webpages load faster.

When you open a website. It sends requests to the server. Depending on the size of the webpage and number of files the number of requests can vary from one to several hundred thousand. The more the number of files the higher the number of requests and slower a site.

Let me explain.

You open a webpage. A typical webpage has hundreds of files like CSS files, Javascript, images etc All these files send the request to the server. By leveraging browser caching we can make the website load fast on a repeat visit.

If you leveraging browser caching, It will not make any difference in the speed of a website , It it opened for the first time. But on subsequent visits, It will load much faster.

Let me explain.

You open a website, all files loaded in a temporary memory of the computer like logo, code files,, text files etc. Most of the times there is a portion of CSS which has been used on inner pages of the website as well besides logo, header, footer etc. In that case, you can instruct the browser to store those files and when you open inner pages the browser will not need to send requests for the files which are not changing eg logo, CSS etc

How to Leverage Browser Caching?

Leverage Browser Caching is done by adding codes to your web server.

Add the following code to the .htaccess file:

The code below should be added to the top of your .htaccess file.

leverage browser caching

## EXPIRES CACHING ##
<IfModule mod_expires.c>
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 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”
</IfModule>
## EXPIRES CACHING ##

Upload the file and refresh your webpage.

In the above code, you see 1 year or 1 month. You can change and define the time as instructed the browser.

You can define the time for image files as one year.

If you want to speed up your website then you can use Google developer’s tool and find suggestions for your website.

Need help with Leverage Browser Caching ? Call 1-855-801-9192 to talk to SEO India experts.

Recent Posts

SEO Backlink Services- Why do backlinks matter in SEO?

In this digital market, it has become routine for businesses to upgrade their websites, features,…

1 year ago

Meta title and description: an integral part of SEO

Meta title and description: an integral part of SEO What are meta descriptions and how…

2 years ago

Content gap analysis: methods and strategies

Table of content An ordered HTML list How To Identify & Fill The Content Gap…

2 years ago

How Digital Marketing Can Help Local Businesses To Expand Rapidly

Today, everything is digitalized from shopping to buying homes, from finance to classes, Internet Marketing…

2 years ago

Operate your small business globally with the power of digital marketing

In this present world, it is pretty crucial for every small business to try out…

2 years ago

How to Get More Online Clients for Your Cleaning Business

Marketing has seen a significant shift in the past half-decade and especially after Covid 19…

2 years ago

This website uses cookies.