WordPress Code Snippets

A fresh mix of code snippets and tutorials

Disable caching with .htaccess


Quick .htaccess snippet to disable browser caching by modifying Cache-Control, Pragma, and Expires headers. Strictly plug-n-play.

Just add the following directives to your site’s root .htaccess file:

No editing required. I use this technique on several of my sites and it works like a charm. You can verify that it works using any number of freely available online tools, and/or any browser extension that displays header/server response.

Peace peoples.

Learn more

.htaccess made easy

Show Support

Like our new Facebook Page to show support!