last person joined: 10 hours ago 

A place for nonprofit WordPress developers and content managers of all skill levels.
The WordPress group is an engaged network of WordPress developers and content managers, for all skill levels, by WordPress users for WordPress users, to encourage the usage of and advocate for WordPress.

Our goal: to support nonprofit organizations using (or interested in using) WordPress. Additionally, this is a safe and friendly place for beginning WordPress developers and users to ask questions and connect to like-minded people.

Short link: http://community.nten.org/wordpress

Subject: Preventing one page from being cached browser-side?

1.  Preventing one page from being cached browser-side?

Posted Oct 07, 2016 11:24

Hi folks,

I was pointed this way for help from the 501 Tech NYC Facebook group, where I got some ideas to work with but no definitive answer to this question, and I'm hoping you folks will be able to help!

I have a page on my website that needs to not be stored in the user's browser's cache. Every solution I find calls for either PHP or <meta> tags in the <head>, and those are kind of tricky options on a Wordpress-based site for a single page. Any suggestions for what I can do to ensure that one single page of my site doesn't get cached?

I'm currently investigating whether a plugin like WP Super Cache would help, at one suggestion, and I'm also considering whether I can get away with just adding the appropriate PHP to this post type as a whole without it slowing down my site. I do have FTP access to my site and a staging site to play with, so I can try just about anything!

Thanks for your help,


Rachel Goldfarb
Senior Communications Associate
New York, NY

2.  RE: Preventing one page from being cached browser-side?

Posted Oct 07, 2016 12:56

Hi Rachel,

Could you offer a few more details? It would be really hard to block all browser cache for a page since it's likely you'll be loading images, stylesheets, and javascript that are used on other pages. Is there any chance you're not referring to browser cache but instead some type of "server-side" caching like page caching?

Depending on your needs, there are specific WP techniques for preventing caching of specific files (like javascript or CSS files). If so, a generic answer to your question may not be all that useful, hence the request for more details.

One other note is that you can pretty easily target specific Pages in WordPress and put meta tags in the head. Here's a snippet showing putting meta tags in the head. You'll need to change some of the details like the page's ID and which meta tags you want to use.

Hope this helps!

Mark Root-Wiley

MRW Web Design / MRWweb.com / @MRWweb
Thoughtful WordPress Website for Nonprofits & Mission-Driven Organizations
Seattle, WA