- Affected version
- 2.1,2.2
The issue described here https://xenforo.com/community/threads/guest-page-caching.164816/ has been existing for a long time with no resolution .. I tried doing some troubleshooting to see the reason behind it because it was really annoying , I found the bug is very simple
at method
result header will typically look like
Last-Modified is coming from the cached response and it is the time when the cache file was created .. user browser already have a fresh cached version of index page ( just before logout ) .. the browser will display the internal data cached after the given Last-Modified without looking at the HTML response returned from the server.
simple resolution is unsetting
at method
PageCache->getCachedPage()
.. there is a call $response->replaceHeaders($result['headers']);
result header will typically look like
Code:
array (size=5)
'X-Frame-Options' => string 'SAMEORIGIN' (length=10)
'X-Content-Type-Options' => string 'nosniff' (length=7)
'Last-Modified' => string 'Mon, 06 Dec 2021 02:00:48 GMT' (length=29)
'Expires' => string 'Thu, 19 Nov 1981 08:52:00 GMT' (length=29)
'Cache-Control' => string 'private, no-cache, max-age=0' (length=28)
Last-Modified is coming from the cached response and it is the time when the cache file was created .. user browser already have a fresh cached version of index page ( just before logout ) .. the browser will display the internal data cached after the given Last-Modified without looking at the HTML response returned from the server.
simple resolution is unsetting
unset($result['headers']['Last-Modified']);
Last edited: