Bug 1954641 - Part 2: Do not cache inline scripts. r=nbp

Differential Revision: https://phabricator.services.mozilla.com/D242317
This commit is contained in:
Tooru Fujisawa
2025-03-22 11:54:13 +00:00
parent e2f9d5b67b
commit ef5d576f1d

View File

@@ -3059,6 +3059,10 @@ ScriptLoader::CacheBehavior ScriptLoader::GetCacheBehavior(
return CacheBehavior::DoNothing;
}
if (aRequest->GetScriptLoadContext()->mIsInline) {
return CacheBehavior::DoNothing;
}
if (!aRequest->mURI->SchemeIs("http") && !aRequest->mURI->SchemeIs("https")) {
// Internal resources can be exposed to the web content, but they don't
// have to be cached.