How to Leverage Browser Caching in WordPress

How to leverage browser caching in WordPress. In simple words, You can say how to cache WordPress static contents in a user browser.

Caching is one of the best ways to improve the overall performance of a website/blog. Caching static contents (such as Js, CSS, Images etc.) helps to improve the loading time of a webpage. In this article, I’ll discuss how to cache static contents of your WordPress blog in a user browser.

What is static Contents ?

Static contents are regular files such as CSS,Javascript,Images etc. which does not change frequently.

Advantage of Caching Static Contents in a User Browser

Browser caching helps to reduce server load by reducing the number of requests per page. Every time when a user visits on your website/blog, the browser renders the page and  download all the static contents such as images, CSS, JavaScript files etc in the background.

So, If you cache these files in a user browser, think about how much bandwidth and downloading time you can save when user visit again on your website.

Advantage of Caching Static Contents

1. Improves load time.

2. Improves  SEO ranking – Google hates slow loading website and gives them a lower rank.

3. Save bandwidth.

4. Reduce no. of HTTP request.

5. Better user experience.

How to Leverage Browser Caching in WordPress

1. Cache Static Contents through htaccess

If you are not familiar with htaccess files and their usage and then check complete htaccess tutorial.

To enable browser caching through htaccess. Open your htaccess file and add these directives.

That’s all, Now all the static contents (Such as CSS, Js, Images etc) will start cached on user browser.

2. Leverage Browser Caching in WordPress through WordPress Plugin

If you are not comfortable with .htaccess directives then let’s check two most useful plugins for caching. These two plugins are –

Subscribe Our Tutorials

Get Latest Updates on Facebook

a) W3 Total CacheW3 Total Cache is an awesome plugin. It can give you lot more caching options such as Database Cache, Object Cache etc. But in this tutorial, We will only discuss browser caching.

To enable a browser caching go to Performance -> Browser Cache section. Now just check enable check box.

Browser Caching through W3 Total Cache

b) WP Super CacheWP super cache is another great plugin that cache your files and provide lot more options for better performance of your blog.

To enable caching through WP Super Cache

Wp Super Cache

If you want to go for more performance. Go for advance setting

WP Super Cache advance settings.

Remember, Caching is the key to improves your blog and website performance. Apart from caching, You can also use CDN and Memcache (in-memory) caching to supercharge your blog/website.

Cloudflare provides free CDN services.


About WebRewrite

I am technology lover who loves to keep updated with latest technology. My interest field is Web Development.
Tagged , , . Bookmark the permalink.