diff --git a/src/common/file/browser.ts b/src/common/file/browser.ts index 529f7a3..852a88a 100644 --- a/src/common/file/browser.ts +++ b/src/common/file/browser.ts @@ -55,6 +55,10 @@ async function fetch_resource_inner(options: DownloadOptions, path: string, prog let url: URL | string try { url = new URL(path, lib_path) + const lastmod = options.engine_files?.[path] + if (lastmod) { + url.searchParams.set("lastmod", lastmod) + } } catch { url = lib_path + path diff --git a/src/common/file/interface.ts b/src/common/file/interface.ts index ea49e68..464e344 100644 --- a/src/common/file/interface.ts +++ b/src/common/file/interface.ts @@ -25,4 +25,5 @@ export interface DownloadOptions { /** Use the file proxy; if disabled may mean that some files can't be loaded */ // We could just say to exclude proxy_url instead? use_proxy?: boolean | number, -} \ No newline at end of file + engine_files?: {[key: string]: string}, +}