Force CSS changes to bust browser cache

Categorized under:

Photo of author
Written By Brian Krogsgard

4 thoughts on “Force CSS changes to bust browser cache”

  1. (Here’s some context to the Gist)

    When Genesis enqueues the child theme’s stylesheet, it checks to see if ‘CHILD_THEME_VERSION’ is defined. If it is, that is used as the version. If it isn’t, the parent theme’s version number is used (view source on my site to see ?ver=1.91, which is Genesis’ current version).

    The code in the Gist sets the child theme version to the last modified date of style.css. So when you modify it, the URL to your stylesheet changes and the cache is busted.

Comments are closed.

A2 Hosting