Hello @cosuqar-
Thanks for reaching out, that’s definitely odd that the Admin bar is still showing with those settings.
Do you have any additional layers of caching in your hosting environment, such as an NGINX or Varnish proxy cache?
When Don't cache pages for logged in users
is checked, the pages should be served with no-cache
headers, which should be respected by any other caching layer. Can you verify that the following header is present when you view a page while logged-in?
cache-control: no-cache
You can check this using your browser’s developer console, in the Network tab.
If you can recreate the error, can you also check the W3 Total Cache comment near the bottom of your page source to verify that is says “User is logged in?” and double-check the headers on that request as well?
Yes I have that in Request Header
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cache-Control: no-cache
Connection: keep-alive
Pragma: no-cache
sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="92", "Opera";v="78"
sec-ch-ua-mobile: ?0
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 OPR/78.0.4093.147
and this is the W3 Total Cache comment in html output
<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/
Page Caching using disk
Served from: neareasthospital.com @ 2021-08-16 23:17:50 by W3 Total Cache
-->
Thank you @jessecowens
Hello @cosuqar
Thank you for the information.
I’ve checked your website, page by page and I am not seeing the admin bar cached. If you enabled the “Don’t cache pages for logged-in users” option this means that the pages will not be cached for any logged-in user and this means any user roles also, so you can disable “Don’t cache pages for following user roles”. This option should be used if you only want pages not to be cached for specific user roles.
Is there any specific page this issue occurs on and as @jessecowens asked, are you using any other layer of caching like proxy or server-side caching?
Thanks!
It is not there consistently. Usually appears after cache was cleared and if there a is logged in user to trigger caching. and no there isn’t any other caching system from server side.
Thanks @vmarko
-
This reply was modified 2 years, 8 months ago by cosuqar.
-
This reply was modified 2 years, 8 months ago by cosuqar.
Hello @cosuqar
Thank you for the information.
1. Make sure that the option “Don’t cache pages for logged-in users” is enabled, save all settings, and purge the cache.
2. manually delete the wp-content/cache/page_enhanced/ folder. This will ensure that any cached pages are deleted and not being served to the users.
3. the steps above will ensure that once the page is visited as logged-in it does not get cached.
Please let me know if this helps, and also make sure to share the URL of the page you are experiencing the issue on.
Thanks!