Skip to content

Commit cd237a9

Browse files
site: disable caching for index and version-history.json; fix platform dedupe to show Windows/mac when canonical is missing
1 parent c971f93 commit cd237a9

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

index.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2898,9 +2898,14 @@ <h2 class="section-title">
28982898
});
28992899

29002900
// Add any remaining platforms not in priority list (excluding duplicates)
2901-
const excludedPlatforms = new Set(["win32-x64", "win32-arm64"]); // These duplicate the system versions
2901+
// Only exclude legacy Windows aliases if canonical variants exist; otherwise include them
29022902
Object.entries(platforms).forEach(([key, url]) => {
2903-
if (!addedPlatforms.has(key) && !excludedPlatforms.has(key)) {
2903+
const isLegacyWin = key === "win32-x64" || key === "win32-arm64";
2904+
const hasCanonical =
2905+
(key === "win32-x64" && (platforms["win32-x64-system"] || platforms["win32-x64-user"])) ||
2906+
(key === "win32-arm64" && (platforms["win32-arm64-system"] || platforms["win32-arm64-user"]));
2907+
2908+
if (!addedPlatforms.has(key) && (!isLegacyWin || !hasCanonical)) {
29042909
result.push({ key, url });
29052910
addedPlatforms.add(key);
29062911
}

vercel.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
{
22
"version": 2,
33
"routes": [
4+
{
5+
"src": "/",
6+
"dest": "/index.html",
7+
"headers": {
8+
"Cache-Control": "no-store, must-revalidate"
9+
}
10+
},
411
{
512
"src": "/version-history.json",
613
"dest": "/version-history.json",
714
"headers": {
815
"Content-Type": "application/json",
9-
"Cache-Control": "public, max-age=300"
16+
"Cache-Control": "no-store, must-revalidate"
1017
}
1118
},
1219
{

0 commit comments

Comments
 (0)