⚡ WordPress · Client-side · No data sent to server

.htaccess Browser Caching Generator

Set browser cache lifetimes per file type and generate the Apache mod_expires rules for your .htaccess. This is the standard fix for the "serve static assets with an efficient cache policy" and "leverage browser caching" warnings.

Cache lifetime per file type

Long lifetimes are safe for fingerprinted assets (style.abc123.css). Keep HTML short or uncached so content updates show right away.

Options

.htaccess
 Copied 
Where this goes. Paste into the .htaccess file at your site root. It needs Apache mod_expires (and mod_headers for Cache-Control), which most hosts enable. If you ever need to force a fresh copy before the cache expires, change the file name or query string. Rules are built in your browser.