Support

Account

Home Forums Gutenberg Block CSS – versioning for cache Reply To: Block CSS – versioning for cache

  • Yes, I noticed this too @shauny and thanks @hube2 for the info. Adding what I’ve found to this to hopefully help. First up, this is a known issue apparently. So, if anyone wants to follow it or contribute to fixing it, please check it out.

    Until it is fixed, if you are simply removing the query string as John mentioned, your browser like will still cache the CSS file (mine does, so I have to resort to CTRL+F5 hard refresh on every change). You really do need the automatic cache busting that WP already does for JavaScript assets added in block.json. Until then, the only other thing you can do is add and adjust the “version” setting in your block.json file each time you change something. That would mean doing something like this:

    
     "version": "0.1.3"