Currently rx.asset() returns a plain path like /my-image.png. When you redeploy with an updated asset, browsers may serve the stale cached version since the URL hasn't changed.
The fix is straightforward: append a short SHA-256 hash of the file's contents as a query parameter (?v=<8-char-hash>), so the URL only changes when the file actually changes. This gives permanent cacheability without manual cache invalidation.
current
rx.asset("logo.svg") # → /logo.svg
proposed
rx.asset("logo.svg") # → /logo.svg?v=a1b2c3d4
We've been running this in production with a local wrapper and it works well.
Currently rx.asset() returns a plain path like /my-image.png. When you redeploy with an updated asset, browsers may serve the stale cached version since the URL hasn't changed.
The fix is straightforward: append a short SHA-256 hash of the file's contents as a query parameter (?v=<8-char-hash>), so the URL only changes when the file actually changes. This gives permanent cacheability without manual cache invalidation.
current
rx.asset("logo.svg") # → /logo.svg
proposed
rx.asset("logo.svg") # → /logo.svg?v=a1b2c3d4
We've been running this in production with a local wrapper and it works well.