CSS resources prefetching as a mitigation against CSS PP0 (https://github.com/Yossioren/pp0).
This commit is contained in:
parent
5cd6a01b5c
commit
de80b7b115
|
@ -178,6 +178,15 @@ ns.on("capabilities", () => {
|
|||
notifyPage();
|
||||
});
|
||||
|
||||
prefetchCSSResources(false, (rule, url) => {
|
||||
debug("Prefetching %s from CSS", url, rule.cssText);
|
||||
/* Uncomment to debug prefetching by prefixing the prefetched domains
|
||||
url.hostname = `prefetch.${url.hostname}`;
|
||||
new Image().src = url;
|
||||
return true;
|
||||
*/
|
||||
});
|
||||
|
||||
ns.fetchPolicy();
|
||||
notifyPage();
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@
|
|||
"nscl/common/RequestKey.js",
|
||||
"content/DocumentCSP.js",
|
||||
"nscl/content/NoscriptElements.js",
|
||||
"/nscl/content/prefetchCSSResources.js",
|
||||
"content/onScriptDisabled.js",
|
||||
"content/staticNS.js",
|
||||
"content/PlaceHolder.js",
|
||||
|
|
2
src/nscl
2
src/nscl
|
@ -1 +1 @@
|
|||
Subproject commit b222a9fdb06ff5ae5049aeeee32dcc83a4ef4c2a
|
||||
Subproject commit 7ec0758e425af9676466fe5f537b65b7998d4823
|
Loading…
Reference in New Issue