TutorialLab
leverage browser caching
Home » SEO » How to Leverage browser caching

How to Leverage browser caching

In this web tutorial I will explain how you can use .htaccess file to leverage browser caching in your website, So that user which already access your website can get fast page load speed.So first we will explain what browser caching is and how it help us and then we will see how we can leverage browser caching using .htaccess file.

Browser Caching?

When your browser load any website it load’s several things like CSS, JavaScript, Images (logo, post images) and other resources.What browser caching does is when you go to another page in the same website than browser store that resources and do not load it again, this eliminate the browser to reload that resources again and again but only store it and use it on every page of the website without reloading it.

 

Why Browser Caching?

Browser caching store bandwidth of your server and make the page load fast. Also it can serve to user very fast without refreshing all contents of your page/website.

 

How to Enable Browser Caching?

The most common method of enabling browser caching is to use .htaccess file present in the root directory of your website or server.we insert some code to the .htaccess file to enable browser caching.Some of the CMS like wordpress use plugins for the browser catch and other type of catch.But if you don’t want to use plugin or if you don’t use a CMS where caching plugin is not help full or not developed then you can use manual insert the .htaccess code to avail browser caching or any other type of caching.

The code below tells browsers what to cache and how long to “remember” it. It should be added to the top of your .htaccess file. Here is the code to leverage browser caching htaccess.

This .htaccess code will Leverage browser caching for your website and will make it much fast so you can get a faster load time and a batter ranking for your site in search engines.

you can also use the above code to leverage browser caching in WordPress .htaccess, just copy it and paste it in the WordPress public_html .htaccess file.

 

leverage browser caching plugin:

Below are few plugins which you can use inside WordPress to leverage browser caching.

  1. W3 Total Cache
  2. wp fast cache
  3. wp super cache
  4. wp rocket

These plugins can be use to leverage browser caching inside WordPress, the most used plugin in WordPress in the above list is w3 total cache and it have a lot of options.

If you have know more efficient method for browser caching than please share that in the comments.

hassan

A Freelancer web developer, graphic designer and own this blog to spread knowledge.My hobby is computer problem's solving and i love to help other in this field.

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.