Append CSS/JS file version# when exporting or publishing sites, to eliminate cacheing issues

for example: if only i could ask Webflow to export CSS/JS files with ?{{site_version}} at the end of the file name.. like so:

  • src="/js/webflow.js?{{site_version}}"
  • href="/css/webflow.css?{{site_version}}"

This will cause browsers to reload CSS/JS files if they have changed (rather than loading old version from cache)

 
  • Shahar Shamay
  • Sep 6 2018
  • Reviewed
  • Martin Schwenzer commented
    December 02, 2022 14:08

    Code export is not working for clients, without cache busting the assets like .css files.

    As of this, I would say, code export is broken for now.


    So please add a simple cache busting, as suggested above.

    Just appending ?v=hash would be fine.

  • Jim Dabell commented
    September 03, 2019 07:17

    A content-based hash would be better as you don't have to keep track of version numbers.  It also eliminates the possibility of breaking things by reverting from backup then making further changes.

    A lot of systems do this by default, so, e.g., you would have /js/webflow.abcdef.js where abcdef is the content hash.

  • +9