loading: add 'noCache' option for <replay-web-page> embeds, ensure option is passed to wabac.js loader
dependencies: update to wabac.js 2.12.3 to fully support noCache for WARCs bump to 1.6.4
This commit is contained in:
+18
-12
@@ -185,27 +185,33 @@ You can select a file to upload from the main page by clicking the 'Choose File.
|
||||
source = {sourceUrl};
|
||||
}
|
||||
|
||||
source.newFullImport = (this.loadInfo && this.loadInfo.newFullImport);
|
||||
|
||||
this.state = "started";
|
||||
|
||||
let type = undefined;
|
||||
let extraConfig = undefined;
|
||||
|
||||
if (this.loadInfo) {
|
||||
source.newFullImport = this.loadInfo.newFullImport;
|
||||
source.noCache = this.loadInfo.noCache;
|
||||
|
||||
if (this.loadInfo.extraConfig) {
|
||||
extraConfig = this.loadInfo.extraConfig;
|
||||
}
|
||||
// todo: too special case?
|
||||
if (sourceUrl.startsWith("proxy:") && extraConfig && extraConfig.recording) {
|
||||
type = "recordingproxy";
|
||||
}
|
||||
}
|
||||
|
||||
const msg = {
|
||||
msg_type: "addColl",
|
||||
name: this.coll,
|
||||
extraConfig,
|
||||
type,
|
||||
skipExisting: true,
|
||||
file: source
|
||||
};
|
||||
|
||||
if (this.loadInfo) {
|
||||
if (this.loadInfo.extraConfig) {
|
||||
msg.extraConfig = this.loadInfo.extraConfig;
|
||||
}
|
||||
// todo: too special case?
|
||||
if (sourceUrl.startsWith("proxy:") && msg.extraConfig && msg.extraConfig.recording) {
|
||||
msg.type = "recordingproxy";
|
||||
}
|
||||
}
|
||||
|
||||
if (!navigator.serviceWorker.controller) {
|
||||
await new Promise((resolve) => {
|
||||
navigator.serviceWorker.addEventListener("controllerchange", () => resolve());
|
||||
|
||||
Reference in New Issue
Block a user