Limit CSS PP0 mitigation to scriptless pages and prefetch only cross-site resources.

This commit is contained in:
hackademix 2021-03-15 20:14:43 +01:00
parent 3f2d9cfb20
commit fd47b4dac7
1 changed files with 8 additions and 9 deletions

View File

@ -171,21 +171,20 @@ ns.on("capabilities", () => {
}
})();
}
prefetchCSSResources(true, (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;
*/
});
onScriptDisabled();
}
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();