Title: Leverage Browser Caching
Author: Rinku Y
Published: <strong>Июл 3, 2017</strong>
Last modified: Июн 29, 2026

---

Search plugins

![](https://ps.w.org/leverage-browser-caching/assets/banner-772x250.png?rev=1691355)

![](https://ps.w.org/leverage-browser-caching/assets/icon-256x256.png?rev=1691355)

# Leverage Browser Caching

 By [Rinku Y](https://profiles.wordpress.org/rinkuyadav999/)

[Download](https://downloads.wordpress.org/plugin/leverage-browser-caching.2.7.zip)

 * [Details](https://tg.wordpress.org/plugins/leverage-browser-caching/#description)
 * [Reviews](https://tg.wordpress.org/plugins/leverage-browser-caching/#reviews)
 *  [Installation](https://tg.wordpress.org/plugins/leverage-browser-caching/#installation)
 * [Development](https://tg.wordpress.org/plugins/leverage-browser-caching/#developers)

 [Support](https://wordpress.org/support/plugin/leverage-browser-caching/)

## Description

**Leverage Browser Caching** is a lightweight, zero-configuration WordPress plugin
that dramatically improves your website’s loading speed by instructing visitors’
browsers to cache static files locally.

With a single activation, the plugin writes optimized browser caching rules to your`.
htaccess` file. When you deactivate the plugin, those rules are cleanly removed —
leaving your `.htaccess` exactly as it was.

#### Why Browser Caching Matters

Every time a visitor loads a page, their browser downloads CSS, JavaScript, images,
and fonts. Without caching, those same files are re-downloaded on every single visit—
wasting bandwidth and slowing down your site.

Browser caching tells the visitor’s browser to store those static files locally 
for a set period. On their next visit, the browser serves them from its local cache
instead of fetching them from the server again. The result: **faster page loads,
lower server load, and a better user experience**.

#### What This Plugin Does

 * Adds browser caching expiry headers to your `.htaccess` file on plugin **activation**.
 * Removes them cleanly on plugin **deactivation** — no leftover code.
 * Requires **zero configuration** — install, activate, and it works.
 * Covers all major static asset types:
    - **Images** — JPEG, PNG, GIF, WebP, AVIF, SVG, ICO
    - **Web Fonts** — WOFF, WOFF2, TTF
    - **Stylesheets** — CSS
    - **Scripts** — JavaScript
    - **Documents** — HTML, XHTML, PDF
    - **Data** — JSON
    - **Other** — SWF

#### Improve Your PageSpeed Score

This plugin directly fixes the «Leverage Browser Caching» or «Serve static assets
with an efficient cache policy» warning shown by:

 * **Google PageSpeed Insights**
 * **GTmetrix**
 * **Pingdom Website Speed Test**
 * **WebPageTest**
 * **YSlow**

#### Cache Expiry Periods

 Asset Type
 Cache Duration

 Images (JPEG, PNG, GIF, WebP, AVIF, SVG, ICO)
 1 Year

 Web Fonts (WOFF, WOFF2, TTF)
 1 Year

 CSS, JavaScript
 1 Month

 HTML, PDF, JSON
 1 Month

 Everything else
 1 Month

#### Requirements

 * **Apache web server** with `mod_expires` module enabled.
 * A writable `.htaccess` file in your WordPress root directory.
 * This plugin does **not** work on Nginx or IIS servers.

## Screenshots

[⌊Browser caching rules added to .htaccess after plugin activation.⌉⌊Browser caching
rules added to .htaccess after plugin activation.⌉[

Browser caching rules added to .htaccess after plugin activation.

## Installation

#### Option 1: Install via WordPress Dashboard (Recommended)

 1. Go to **Dashboard  Plugins  Add New**.
 2. Search for **Leverage Browser Caching**.
 3. Click **Install Now**, then click **Activate**.
 4. That’s it — the plugin is working immediately.

#### Option 2: Upload via WordPress Dashboard

 1. Download the plugin ZIP from: https://wordpress.org/plugins/leverage-browser-caching/
 2. Go to **Dashboard  Plugins  Add New  Upload Plugin**.
 3. Select the downloaded ZIP file and click **Install Now**.
 4. Click **Activate Plugin**.

#### Option 3: Upload via FTP

 1. Download the plugin ZIP from: https://wordpress.org/plugins/leverage-browser-caching/
 2. Extract the ZIP to find the `leverage-browser-caching` folder.
 3. Upload the folder to `/wp-content/plugins/` on your server.
 4. Go to **Dashboard  Plugins**, find the plugin, and click **Activate**.

## FAQ

### Does this plugin work on Nginx or Windows IIS servers?

No. This plugin works exclusively on **Apache web servers** by writing directives
to `.htaccess`. It has no effect on Nginx or IIS. For Nginx, caching headers must
be configured at the server level.

### Do I need to configure anything after activating?

No. The plugin is completely **zero-configuration**. Simply activate it and it starts
working immediately.

### What happens when I deactivate the plugin?

The plugin **cleanly removes** all caching rules it added to `.htaccess`. Your file
will be restored to its previous state with no leftover code.

### Some third-party JavaScript files still show as uncached — why?

Browsers can only cache files served from your own domain. Files loaded from third-
party domains (e.g., Google Analytics, Facebook Pixel, or ad networks) are outside
your control and cannot be cached by your server’s `.htaccess`. This is a browser
security restriction. [Learn more](https://stackoverflow.com/questions/9580307/set-cache-control-to-external-resources/9580334#9580334).

### My PageSpeed score improved but still shows a warning — what should I do?

Remaining warnings are almost always caused by third-party scripts (see above). 
For files on your own domain, ensure the plugin is activated and that your `.htaccess`
is writable. You can verify by checking your `.htaccess` file for the `# LBROWSERCSTART
Browser Caching` block.

### Where can I find the options page?

There is no options page — the plugin works automatically with no settings to configure.

### I need support

Please open a support topic on the [WordPress.org support forum](https://wordpress.org/support/plugin/leverage-browser-caching/).

## Reviews

![](https://secure.gravatar.com/avatar/5eba82187f5b3bb898da2e72a5b6ea95b89c72d2f64b9feaa577877a308068a3?
s=60&d=retro&r=g)

### 󠀁[Do what it says](https://wordpress.org/support/topic/do-what-it-says-17/)󠁿

 [Sepi](https://profiles.wordpress.org/sepicompanywork/) Май 13, 2024

nothing need to do. thank you dev team

![](https://secure.gravatar.com/avatar/7d02f267a6671fc5c65cebc946b9550b674f5d436b1d1c89eed1771c97505765?
s=60&d=retro&r=g)

### 󠀁[This App Works Wonders!](https://wordpress.org/support/topic/this-app-works-wonders/)󠁿

 [kasper82](https://profiles.wordpress.org/kasper82/) Март 2, 2021

I just want to thank you. I never leave reviews, but this just cut down the loading
time on my site by 5 second and increased my GT Metrix rating from an F to a B. 
With just one plugin! I was really worried that my site was taking so long to load,
but this was just the thing I needed. Great Application. If I could give more stars,
I would!

![](https://secure.gravatar.com/avatar/c5ce7fbeb7335e002a3a51057fd67e158f373ae9d41efccd2cb0b691dd89e106?
s=60&d=retro&r=g)

### 󠀁[Injects ads in the Dashboard](https://wordpress.org/support/topic/injects-ads-in-the-dashboard/)󠁿

 [canegunkai](https://profiles.wordpress.org/canegunkai/) Феврал 18, 2021

Injects ads in all pages in the Dashboard.

![](https://secure.gravatar.com/avatar/59aba984ea7df668c7aa8fb91c9ff34435f10a1911e3a2cf28401a0c76345799?
s=60&d=retro&r=g)

### 󠀁[Super](https://wordpress.org/support/topic/super-2008/)󠁿

 [redrocksoftwares](https://profiles.wordpress.org/redrocksoftwares/) Ноябр 10, 
2020

Before installing this Leverage browser caching of my website is F(4) according 
to GT Matrix. But after installing this it will be changed in D(60) truly amazing
and awesome thing is that, they have no settings to set, it will be works automatically.
Thank You Mr. Rinku Yadav

![](https://secure.gravatar.com/avatar/16b81015900d45e92183312a9f5f2b9339e6ce356f199a0b86075123f1681050?
s=60&d=retro&r=g)

### 󠀁[Works as expected](https://wordpress.org/support/topic/works-as-expected-625/)󠁿

 [bondimedical3](https://profiles.wordpress.org/bondimedical3/) Октябр 30, 2020

Easy to install and no settings to adjust as it automatically writes the code to
your htaccess file. My score for leverage browser caching on GTmetrix went from 
F to B. Thank you for your great work.

![](https://secure.gravatar.com/avatar/3ffef13c7282263feee8b55c5b3655a398b451e4d52a06a8c62257439c9a08c3?
s=60&d=retro&r=g)

### 󠀁[Does the JOb](https://wordpress.org/support/topic/does-the-job-715/)󠁿

 [SirAde](https://profiles.wordpress.org/sirade/) Август 8, 2020

tried it on 3 of my site and does the job easily

 [ Read all 42 reviews ](https://wordpress.org/support/plugin/leverage-browser-caching/reviews/)

## Contributors & Developers

“Leverage Browser Caching” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Rinku Y ](https://profiles.wordpress.org/rinkuyadav999/)

[Translate “Leverage Browser Caching” into your language.](https://translate.wordpress.org/projects/wp-plugins/leverage-browser-caching)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/leverage-browser-caching/),
check out the [SVN repository](https://plugins.svn.wordpress.org/leverage-browser-caching/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/leverage-browser-caching/)
by [RSS](https://plugins.trac.wordpress.org/log/leverage-browser-caching/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.7

 * Code improvements: browser caching rules now added only on plugin activation 
   and removed only on deactivation.
 * Added modern MIME types: WebP, AVIF, SVG, WOFF, WOFF2, TTF, JSON.
 * Removed invalid `image/jpg` MIME type (duplicate of `image/jpeg`).
 * Security: added `LOCK_EX` flag to all file write operations to prevent race conditions.
 * Security: added `current_user_can()` capability check before modifying `.htaccess`.
 * Code quality: all class properties changed from `public` to `private`.
 * Fixed typo: «Apace» corrected to «Apache» in admin notice.
 * Fixed overly aggressive newline normalisation in `.htaccess` cleanup.
 * Improved admin notices to use modern WordPress `notice notice-error` CSS classes.

#### 2.6

 * Removed additional class.

#### 2.5

 * Tested up to WordPress 6.6.
 * Added additional class.

#### 2.4

 * Tested up to latest WordPress.

#### 2.3

 * Tested up to WordPress 6.3.

#### 2.2

 * Tested up to WordPress 6.0.

#### 2.1

 * 14 December, 2020
 * Tested up to WordPress 5.6.

#### 2.0

 * 24 July, 2020
 * Tested up to WordPress 5.4.2.
 * Removed action link.
 * Improved info messages.

#### 1.9

 * 26 November, 2019
 * Tested up to WordPress 5.3.

#### 1.8

 * 23 February, 2018
 * Removed rate-this-plugin code.
 * Added donate link.

#### 1.7

 * 07 August, 2018
 * Description updates.
 * Rating link.

#### 1.6

 * 07 February, 2018
 * Fix: Fatal Error.

#### 1.5

 * 15 November, 2017
 * Added capability check.

#### 1.4

 * 1 November, 2017
 * Small bug fix.
 * Refactored credits.

#### 1.3

 * 1 November, 2017
 * Credit link changes.

#### 1.2

 * 26 October, 2017
 * Credit links updated.

#### 1.1

 * 01 August, 2017
 * Fix: ExpiresByType entries.

#### 1.0

 * 30 June, 2017
 * First release.

## Meta

 *  Version **2.7**
 *  Last updated ** 17 соат ago**
 *  Active installations **10,000+**
 *  WordPress version ** 4.0 or higher **
 *  Tested up to **7.0**
 *  PHP version ** 5.6 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/leverage-browser-caching/)
 * Tags
 * [Browser Caching](https://tg.wordpress.org/plugins/tags/browser-caching/)[htaccess](https://tg.wordpress.org/plugins/tags/htaccess/)
   [leverage browser caching](https://tg.wordpress.org/plugins/tags/leverage-browser-caching/)
   [Page Speed](https://tg.wordpress.org/plugins/tags/page-speed/)[site-speed](https://tg.wordpress.org/plugins/tags/site-speed/)
 *  [Advanced View](https://tg.wordpress.org/plugins/leverage-browser-caching/advanced/)

## Ratings

 4.1 out of 5 stars.

 *  [  29 5-star reviews     ](https://wordpress.org/support/plugin/leverage-browser-caching/reviews/?filter=5)
 *  [  3 4-star reviews     ](https://wordpress.org/support/plugin/leverage-browser-caching/reviews/?filter=4)
 *  [  2 3-star reviews     ](https://wordpress.org/support/plugin/leverage-browser-caching/reviews/?filter=3)
 *  [  3 2-star reviews     ](https://wordpress.org/support/plugin/leverage-browser-caching/reviews/?filter=2)
 *  [  5 1-star reviews     ](https://wordpress.org/support/plugin/leverage-browser-caching/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/leverage-browser-caching/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/leverage-browser-caching/reviews/)

## Contributors

 *   [ Rinku Y ](https://profiles.wordpress.org/rinkuyadav999/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/leverage-browser-caching/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://paypal.me/RinkuYadav)