Recently I have tried to answer this question and I noted how important is to understand the caching when solving Wordpress problems.

Namely, I just wanted to summarize the possible levels of caching that may exist between the web browsers and WordPress website.

There is:

  • A browser caching
  • Possible proxy web server caching
  • WordPress plugin caching (W3TC, ...)
  • Webserver software caching (Like Redis, Memcached ,...)
  • WordPress query caching
  • MySQL caching
  • PHP opcode caching
  • Maybe more

This may look complex but if I add custom version to the URL like ?version=3.14 will all possible caches be defeated?


Adding custom variables(query strings) to static resources doesn't affect caching at some of the levels you've listed above:

  • WordPress plugin caching
  • Webserver software caching
  • PHP opcode caching
  • MySQL caching
  • WordPress query caching
  • Several more etc.

All of these don't cache static resources(js, css and so on) but rather cache the output of application codes at their different applied levels.

Most Proxy Servers, CDNs and browser cache prevent caching static resources with query strings as it is a common method used for breaking cached objects so caches at the browser cache level for instance would be invalidated when the query strings are updated.

To my knowledge, this might be because caches of static resources are actual copies of the static files stored with the headers and references to the object's url.

  • WordPress plugin caching is very complex thought. – prosti Jan 5 '17 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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