Can I control the browser caching somehow? I noti...
# compose-web
s
Can I control the browser caching somehow? I noticed that after a new release of https://stefan-oltmann.de/exif-viewer/ my firefox will keep the old version for a long time. Looks like the wasm module is not updated. Is there something I can set to a new version that updates are enforced?
1
c
not really related to Kotlin. it depends on your webserver. you can have caching headers for example, or “annotate” the assets you website serves via i.e. webpack caching plugin https://webpack.js.org/guides/caching/
👍 1
a
I typically add a digest to the file name and index.html links referring to it via some Gradle task. Automatic cache invalidation
👍 2
s
@Arjan van Wieringen That sounds like a great idea. Do you have an open source sample for that (to save me time before I implement it myself)? 🙂
a
Well, I have a Gradle plugin for it written in our proprietary monorepo…. So I can not share directly. However, if it is really simple setup you can add something that depends on “processResources” and does some simple rename and search and replace inside the html
👍 1