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:
@@ -1,5 +1,9 @@
|
|||||||
## CHANGES
|
## CHANGES
|
||||||
|
|
||||||
|
v1.6.4
|
||||||
|
- Embeds: Support `noCache` attribute in `<replay-web-page>` to disable cacheing any HTTP response payloads
|
||||||
|
- Dependencies: update to wabac.js 2.12.3
|
||||||
|
|
||||||
v1.6.3
|
v1.6.3
|
||||||
- Loading: replay fixes for WARCs with revisit records (via wabac.js)
|
- Loading: replay fixes for WARCs with revisit records (via wabac.js)
|
||||||
- Fidelity: fix for rewriting of some JS incorrectly treated as a module (via wabac.js)
|
- Fidelity: fix for rewriting of some JS incorrectly treated as a module (via wabac.js)
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "replaywebpage",
|
"name": "replaywebpage",
|
||||||
"productName": "ReplayWeb.page",
|
"productName": "ReplayWeb.page",
|
||||||
"version": "1.6.3",
|
"version": "1.6.4",
|
||||||
"description": "Serverless Web Archive Replay",
|
"description": "Serverless Web Archive Replay",
|
||||||
"repository": "https://github.com/webrecorder/replayweb.page",
|
"repository": "https://github.com/webrecorder/replayweb.page",
|
||||||
"homepage": "https://replayweb.page/",
|
"homepage": "https://replayweb.page/",
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||||
"@webrecorder/wabac": "^2.12.2",
|
"@webrecorder/wabac": "^2.12.3",
|
||||||
"bulma": "^0.9.3",
|
"bulma": "^0.9.3",
|
||||||
"electron-log": "^4.4.1",
|
"electron-log": "^4.4.1",
|
||||||
"electron-updater": "^4.3.9",
|
"electron-updater": "^4.3.9",
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ The `<replay-web-page>` tag is a web component and supports a number of addition
|
|||||||
| `config` | Extra per collection config options (such as custom fuzzy matching rules, TODO add more info!) |
|
| `config` | Extra per collection config options (such as custom fuzzy matching rules, TODO add more info!) |
|
||||||
| `noSandbox` | if set, don't wrap iframe in `sandbox`. Used as extra precaution to avoid escaping iframe, but prevents PDFs from loading in embed archive. Set for archives of known/trusted sites. |
|
| `noSandbox` | if set, don't wrap iframe in `sandbox`. Used as extra precaution to avoid escaping iframe, but prevents PDFs from loading in embed archive. Set for archives of known/trusted sites. |
|
||||||
| `noWebWorker`| if set, will not use Web Worker for loading, only Service Worker. May be useful for certain loading edge cases. |
|
| `noWebWorker`| if set, will not use Web Worker for loading, only Service Worker. May be useful for certain loading edge cases. |
|
||||||
|
| `noCache` | if set, will not cache any loaded content HTTP responses locally, always loading from original source. |
|
||||||
|
|
||||||
|
|
||||||
### Versioning
|
### Versioning
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "replaywebpage",
|
"name": "replaywebpage",
|
||||||
"productName": "ReplayWeb.page",
|
"productName": "ReplayWeb.page",
|
||||||
"version": "1.6.3",
|
"version": "1.6.4",
|
||||||
"description": "Serverless Web Archive Replay",
|
"description": "Serverless Web Archive Replay",
|
||||||
"repository": "https://github.com/webrecorder/replayweb.page",
|
"repository": "https://github.com/webrecorder/replayweb.page",
|
||||||
"homepage": "https://replayweb.page/",
|
"homepage": "https://replayweb.page/",
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||||
"@webrecorder/wabac": "^2.12.2",
|
"@webrecorder/wabac": "^2.12.3",
|
||||||
"bulma": "^0.9.3",
|
"bulma": "^0.9.3",
|
||||||
"electron-log": "^4.4.1",
|
"electron-log": "^4.4.1",
|
||||||
"electron-updater": "^4.3.9",
|
"electron-updater": "^4.3.9",
|
||||||
|
|||||||
@@ -386,6 +386,14 @@ class ReplayWebApp extends LitElement
|
|||||||
this.loadInfo.noWebWorker = true;
|
this.loadInfo.noWebWorker = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (this.pageParams.get("noCache") === "1") {
|
||||||
|
if (!this.loadInfo) {
|
||||||
|
this.loadInfo = {};
|
||||||
|
}
|
||||||
|
this.loadInfo.noCache = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (IS_APP && this.sourceUrl.startsWith("file://")) {
|
if (IS_APP && this.sourceUrl.startsWith("file://")) {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const url = new URL(__APP_FILE_SERVE_PREFIX__);
|
const url = new URL(__APP_FILE_SERVE_PREFIX__);
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class Embed extends LitElement
|
|||||||
this.reloadCount = 0;
|
this.reloadCount = 0;
|
||||||
this.noSandbox = false;
|
this.noSandbox = false;
|
||||||
this.noWebWorker = false;
|
this.noWebWorker = false;
|
||||||
|
this.noCache = false;
|
||||||
this.logo = rwpLogo;
|
this.logo = rwpLogo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,6 +71,7 @@ class Embed extends LitElement
|
|||||||
deepLink: { type: Boolean },
|
deepLink: { type: Boolean },
|
||||||
noSandbox: { type: Boolean },
|
noSandbox: { type: Boolean },
|
||||||
noWebWorker: { type: Boolean },
|
noWebWorker: { type: Boolean },
|
||||||
|
noCache: { type: Boolean },
|
||||||
|
|
||||||
errorMessage: { type: String }
|
errorMessage: { type: String }
|
||||||
};
|
};
|
||||||
@@ -178,6 +180,10 @@ class Embed extends LitElement
|
|||||||
params.noWebWorker = "1";
|
params.noWebWorker = "1";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.noCache) {
|
||||||
|
params.noCache = "1";
|
||||||
|
}
|
||||||
|
|
||||||
this.paramString = new URLSearchParams(params).toString();
|
this.paramString = new URLSearchParams(params).toString();
|
||||||
|
|
||||||
this.hashString = new URLSearchParams({
|
this.hashString = new URLSearchParams({
|
||||||
|
|||||||
+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 = {sourceUrl};
|
||||||
}
|
}
|
||||||
|
|
||||||
source.newFullImport = (this.loadInfo && this.loadInfo.newFullImport);
|
|
||||||
|
|
||||||
this.state = "started";
|
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 = {
|
const msg = {
|
||||||
msg_type: "addColl",
|
msg_type: "addColl",
|
||||||
name: this.coll,
|
name: this.coll,
|
||||||
|
extraConfig,
|
||||||
|
type,
|
||||||
skipExisting: true,
|
skipExisting: true,
|
||||||
file: source
|
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) {
|
if (!navigator.serviceWorker.controller) {
|
||||||
await new Promise((resolve) => {
|
await new Promise((resolve) => {
|
||||||
navigator.serviceWorker.addEventListener("controllerchange", () => resolve());
|
navigator.serviceWorker.addEventListener("controllerchange", () => resolve());
|
||||||
|
|||||||
@@ -995,10 +995,10 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.5.2.tgz#ea584b637ff63c5a477f6f21604b5a205b72c9ec"
|
resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.5.2.tgz#ea584b637ff63c5a477f6f21604b5a205b72c9ec"
|
||||||
integrity sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw==
|
integrity sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw==
|
||||||
|
|
||||||
"@webrecorder/wabac@^2.12.2":
|
"@webrecorder/wabac@^2.12.3":
|
||||||
version "2.12.2"
|
version "2.12.3"
|
||||||
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.12.2.tgz#0d5c100e7d65844d052e4800bf5058be68af7127"
|
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.12.3.tgz#e1517df283b723985101da472a435abc1b89fdcb"
|
||||||
integrity sha512-4oIAzRwweB+QemRBrgSZuo0wxSvv1tz83+wBpQc2ihv2jqbgVko/nr6rNcB1EH2b6+CPpW4GwfmQRyRCu8N69w==
|
integrity sha512-/ulk+JriMgdREM/hB5ChXV3orLFRsj+gLPjbpu/6x2oCehmA8KJgEvr+jXLGouyxLAp+uS/mXmg8+/3mq8qIvw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@webrecorder/wombat" "^3.3.7"
|
"@webrecorder/wombat" "^3.3.7"
|
||||||
brotli "github:foliojs/brotli.js"
|
brotli "github:foliojs/brotli.js"
|
||||||
|
|||||||
Reference in New Issue
Block a user