Because of random high traffic on our website, for which even total cache is not good enough (~ 1000 req/s) we would like to put CDN in front of the whole site. Cloudflare CDN caching seems to do the job with following issues:

  1. Once a page is cached without admin menu bar, admins don't see the menu bar.
  2. Once a page is cached with admin menu bar (by admins), regular users see menu bar even though they shouldn't.

This could be solved by rendering hidden admin menu bar in all cases, but showing it later by JS. Is there a way to achieve this? show_admin_bar(true), but that only shows the bar without any links. I would need this bar to render all admin links to be usable when unhiding it for the admins.

1 Answer 1


Are you able to try this?


There are a few more tips here:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.