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
Chrimaeon
04/06/2024, 11:45 AM
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
Arjan van Wieringen
04/06/2024, 1:41 PM
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
Stefan Oltmann
04/06/2024, 3:57 PM
@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
Arjan van Wieringen
04/06/2024, 4:41 PM
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