Jump to content

Cache-Control no-store, no-cache, must-revalidate

Recommended Posts


So I notice that on a page delivered by this community, for example: https://invisioncommunity.com/forums/forum/406-server-management-resources-optimization/

One of the response headers is 

cache-control:no-store, no-cache, must-revalidate

Looking at the IPS-code this doesn't seem to be a header IPS sets programmatically in the PHP-code. 

I've checked some forums I manage and they all lack those headers. 

It seems that might lead members on those forums (which lack the headers) to be required to refresh a page (after they've used the back-button in their browser) in order to have the previous page be updated (one update might be that the marker telling you that you have unread posts is gone from a topic, that a new topic has been started or similar.)

I note that problem doesn't occur here, so I suspect it has something to do with those headers. 

What I'm wondering is: 

1) Do you have any ideas why cache-control: no-store, no-cache, must-revalidate is not set for me on these forums I manage? Is that something that has to be configured? If it needs to be configured, how should it be configured? Should I tell it to do that for all requests or should I target it better/limit the reach of such a content-cache-rule? I guess the latter. 

Link to comment
Share on other sites

@bfarber: Member reports the following behavior, which I'm able to reproduce: 

1. They click into a forum. For example: https://invisioncommunity.com/forums/forum/406-server-management-resources-optimization/

2. For me, a lot of the topics are unread, so I click on the "Go to last unread"-button on one of them with only a single page

3. I read the entire topic, so it will no longer be marked as unread for me.

4. I click the back button *in my browser* so I'm taken back to the forum view ( https://invisioncommunity.com/forums/forum/406-server-management-resources-optimization/ )

5. The topic I just read (if invisioncommunity.com had the issue) would still be marked as unread in the topic list, however, a refresh of the page would've fixed it.

NOTE: The issue is not present on this community (invisioncommunity.com). When clicking the back button on invisioncommunity.com the unread markers show the correct state without needing to refresh after having used the browser back button/I'm delivered an updated page when using browser back button. I just used this community as an example of how one may navigate. Since I see that these headers are supplied from your servers on pages when navigating I suspect it's something you've either setup in your server setup or it's a default configuration setup from the server supplier you use. 

I suspect these headers (that your community send, and not the communities I manage) tell the browser to retrieve the previous page from a local cache in the browser when using the browser back button, instead of "refreshing" the previous page in history when you use the back button.

I'll need to wait for my server host to get back to me in order to test this further though.


What I'm basically wondering, is whether you have setup a rule in your server config to send this header for invisioncommunity.com (and how that rule is setup) or whether it's a default server config thing from your server provider. Looking at the code it doesn't seem like IPS tries to set it for anything else than redirects, so it doesn't seem like you try to do it programmatically (other than for redirects) 

I'm fine with this being a server config thing, but I'm wondering if the rule should have any limitations, for example to only apply for running of the index.php-file and how that rule would/should look.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...