WP-Mix

A fresh mix of code snippets and tutorials

Disable caching with HTML

If you can’t use .htaccess to disable caching at the server-level, here is an alternate HTML-only method that disables Cache-Control, Pragma, and Expires headers via <meta> tags.

To disable caching for any web page, include the following meta tags in the HTML document <head>:

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">

No editing is required. You can verify that it works using any number of freely available online tools, and/or any browser extension that displays header/server response.

★ Pro Tip:

Wizard’s SQL Recipes for WordPressSAC ProThe Tao of WordPress