Leverage browser caching – .js files


I’m being told by GTmetrix / PageSpeed that I need to Leverage browser caching and Defer parsing of JS files.

I’m currently running Pro and using the plugins “Browser Caching with .htaccess” and “Leverage Browser Caching” but they don’t seem to be handling the JS.

What’s the best way to make these modifications without breaking the theme?



Hello @Feldspar,

Thanks for asking. :slight_smile:

I suggest you to please take a look at our performance optimisation guide in which we have explained how you can optimize the performance of website using W3 Total Cache plugin including the option to leverage browser cache:

You can also take a look at following article for more specific information.

Let us know how it goes.


Thanks Prasant,

I added W3 Total Cache and am getting mixed results.

If I follow the Customizations - Performances instructions, the posts on my landing page and instagram feed no longer load. If I turn off Minification or set it to manual, I get the same results as before installing the W3 plugin.

The thmvestormedia.com link seem to have some outdated info from 2012 that I’m no longer able to find in the plugin interface.



Ideally you should do that in the server configuration, however if you are on Apache server, you can add some snippets to “.htaccess” file which W3Total cache plugin should add for you when you enable Browser caching option, however if you want to do that manually, please follow this guide:


Thanks Alaa,

I believe I’m already leveraging my .htaccess file with that info
Here’s a copy of what it currently has

What should I tell my server support I want to configure?



Hi there,

If the changes that you have done in the .hraccess file is not working, you need to contact your hosting service provider and give them the exact code you used and ask them to apply it from their side.

In general we are not the best people to seek server related optimization questions. Your hosting service provider will help you better on this matter.

Thank you for your understanding.

I also experience speed problems with this

Hi There,

Please open a new ticket with your issue, so that we can help on this.


That article you linked to is from 2012. Seems old… but maybe nothing has changed? I’m not an expert on this stuff!

Hello There,

The article is still active, nothing has changed, and the information on that page still works at present.

Hope this helps. Please let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.