Skip to content

Commit 05debcd

Browse files
committed
Append timestamp to config fetch URL
1 parent b83367d commit 05debcd

2 files changed

Lines changed: 41 additions & 6 deletions

File tree

src/lib/services/config/loader.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ export const fetchFile = async (
5151
: 'config.error.fetch_failed';
5252

5353
try {
54-
response = await fetch(href);
54+
const url = new URL(href, window.location.href);
55+
56+
// Append a timestamp to the URL to prevent caching issues
57+
url.searchParams.set('_', Date.now().toString());
58+
59+
response = await fetch(url);
5560
} catch (ex) {
5661
throw new Error(get(_)(fetchErrorKey), { cause: ex });
5762
}

src/lib/services/config/loader.test.js

Lines changed: 35 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)