Free tool · runs in your browser

Caching Generator (.htaccess / Nginx)

Images, fonts and scripts don’t need to be reloaded on every visit. With the right cache headers the browser serves them from its own storage, and compression halves the rest. The generator builds the block for your web server.

Caching Generator

Set up browser caching and compression

Pick your server, set the lifetimes, copy the rules. Everything runs in your browser.

Server

Note

  • WordPress caching plugins often write these rules themselves already – don't duplicate them.
  • Apache: paste the block into .htaccess – above the # BEGIN WordPress block.
  • Nginx: paste the block inside the server {} block, then run nginx -t and reload.

Your input never leaves the browser. The rules are generated locally via JavaScript.

Everything is generated locally in your browser. Nothing you enter is transmitted to our server.

More tools