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
  • Jim Dabell commented
    3 Sep, 2019 07:17am

    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