Bypass HTTP cache when checking for new versions

The version check fetched latest.json without any cache directive.
The server sends no Cache-Control header, so WebKit applied heuristic
caching (RFC 9111 4.2.2): the response is considered fresh for 10% of
the time since Last-Modified, which can be hours to days between
releases. Apps checking for updates right after a release were served
a stale latest.json from disk cache and concluded they were up to
date. Dev builds use a separate cache, which is why the bug only
appeared in release builds.

Fetch with cache: "no-store" so every check hits the server.
This commit is contained in:
Rūdolfs Ošiņš
2026-06-10 16:02:38 +02:00
parent 239cc84bbf
commit b363fdb297
+1
View File
@@ -11,6 +11,7 @@ interface LatestVersionInfo {
const fetchLatestVersion = async (): Promise<LatestVersionInfo> => {
const response = await fetch(
"https://files.radicle.dev/releases/radicle-desktop/latest/latest.json",
{ cache: "no-store" },
);
const body: LatestVersionInfo = await response.json();
return body;