Title: Cached pages cache-control header
Last modified: November 10, 2022

---

# Cached pages cache-control header

 *  Resolved [Tommy](https://wordpress.org/support/users/baptistej/)
 * (@baptistej)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/)
 * Hello,
 * Was wondering why this plugin no longer respect my cache control header for HTML,
   I have set a “cache-control: no-cache, must-revalidate, max-age=0” but it look
   like the cached page are getting cached by the browsers now.
 * In the past I remember the header was still present on the cached pages.
 * I don’t know if it really matter but my I just want to make sure people always
   see my latest posts.
 * Thank you.
    -  This topic was modified 3 years, 7 months ago by [Tommy](https://wordpress.org/support/users/baptistej/).

Viewing 15 replies - 1 through 15 (of 29 total)

1 [2](https://wordpress.org/support/topic/cached-pages-cache-control-header/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/cached-pages-cache-control-header/page/2/?output_format=md)

 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16187196)
 * no need to set the cache control because it is already added like that.
 * [https://plugins.trac.wordpress.org/browser/wp-fastest-cache/trunk/inc/admin.php#L817](https://plugins.trac.wordpress.org/browser/wp-fastest-cache/trunk/inc/admin.php#L817)
 *  Thread Starter [Tommy](https://wordpress.org/support/users/baptistej/)
 * (@baptistej)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16187329)
 * Well currently when someone is clicking on a cached post and then decide to login,
   the post is still showing like the user is logged out. (cached version)
 * This is why I added the cache-control: no-cache for html on my site, but this
   header no longer work.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16187356)
 * 1. did you enable the “Logged-in User” option?
    2. are you using a server-side
   cache system or cloudflare?
 *  Thread Starter [Tommy](https://wordpress.org/support/users/baptistej/)
 * (@baptistej)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16188238)
 * Yes I enabled this option and I’m using Cloudflare but Cloudflare doesn’t cache
   HTML.
 * When someone login they have to refresh the page to see the uncached pages.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16188339)
 * can you enable the “development mode” of cloudflare and try please?
 *  Thread Starter [Tommy](https://wordpress.org/support/users/baptistej/)
 * (@baptistej)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16188389)
 * Same issue, the only fix I have found is to add: cache-control: no-cache, must-
   revalidate, max-age=0 header to the pages.
 * But it look like I can’t add it anymore
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16188395)
 * where do you want to add it?
 *  Thread Starter [Tommy](https://wordpress.org/support/users/baptistej/)
 * (@baptistej)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16188405)
 * Nginx Config.
 * location ~ \.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$ {
    etag on; if_modified_since
   exact; add_header Pragma “no-cache”; add_header Cache-Control “max-age=0, private,
   no-store, no-cache, must-revalidate”; try_files $uri $uri/ /index.php?$args; }
 * I tested on a new install and it look like WordPress is removing this header.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16188417)
 * neither wordpress nor a plugin is able to remove the rule from nginx config file.
 *  Thread Starter [Tommy](https://wordpress.org/support/users/baptistej/)
 * (@baptistej)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16188493)
 * Can’t really explain what’s happening then.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16188502)
 * can you tell me the site url please?
 *  Thread Starter [Tommy](https://wordpress.org/support/users/baptistej/)
 * (@baptistej)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16188667)
 * I can’t post the URL publicly but I think it’s an issue with WordPress and not
   plugins.
 * I tried some plugins that add cache control header on HTML and they are not working
   either.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16190173)
 * I recommend you to use Apache instead on Nginx.
 *  Thread Starter [Tommy](https://wordpress.org/support/users/baptistej/)
 * (@baptistej)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16191635)
 * Same issue with Apache unfortunately, would it be possible to add an option to
   add the cache control header to the cached pages? Without this header, people
   often think they are not logged in because they are still seeing the cached pages.
   Even with the “Don’t show the cached version for logged-in users” option enabled.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/#post-16192445)
 * are you using the native membership of wordpress or are you using a plugin?

Viewing 15 replies - 1 through 15 (of 29 total)

1 [2](https://wordpress.org/support/topic/cached-pages-cache-control-header/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/cached-pages-cache-control-header/page/2/?output_format=md)

The topic ‘Cached pages cache-control header’ is closed to new replies.

 * ![](https://ps.w.org/wp-fastest-cache/assets/icon-256x256.png?rev=2064586)
 * [WP Fastest Cache - WordPress Cache Plugin](https://wordpress.org/plugins/wp-fastest-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-fastest-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fastest-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fastest-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fastest-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fastest-cache/reviews/)

 * 29 replies
 * 2 participants
 * Last reply from: [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/cached-pages-cache-control-header/page/2/#post-16201309)
 * Status: resolved