javacachingwro4j

wro4j and browser caching


I'm using WRO4j to process my less and js files, and I'm finding that the browser seems to keep caching the old files. WRO4j has an enhancement to add a hash to the URL to bust the cache, but it looks like it hasn't been done. What are my options to force the browser to reload the resources? I'd like a solution that worked regardless of environment.


Solution

  • I think this pretty much answers my question. WRO4J has no options available to handle this. But using URLRewriter, adding version information to the manifest during a build, and quick view template. Then voila! A solution.

    https://raibledesigns.com/rd/entry/versioning_static_assets_with_urlrewritefilter