We had helped quite a few people with this issue, including about a year ago ourselves when we had a 15-minute panic because the WordPress admin. bar refused to disappear even though we were not logged in.
Fearing that the whole world has access to the inner workings of your WordPress website can make it quite a stressful situation, especially when the answer is not easy to be found. It is for this very reason, after helping some people with this very problem on Reddit, that we have decided to document the solution so that others can easily find it.
The Cause — W3 Total Cache
W3 Total Cache is a
The problem is caused by you caching the HTML that is shown for logged in users. What this means is that the cached page is then reproducing what the logged in user sees for subsequent visitors, which includes the admin. bar. Therefore the admin.
The Solution — Change the W3 Total Cache Settings
The solution is very easy. Just navigate to Page Cache Settings under the W3 Total Cache Performance Menu, and tick the box that says "
Also, to put your mind at ease, at no time would the public been able to access any of the admin. functionality even though they could see the admin. toolbar. All they saw was the HTML, but unless they were also logged in with the requisite user permissions, they could do nothing.