This might also be a good addition to LocalCDN/Decentraleyes and similar extensions that hardcode CDN urls manually.
The only problem is not everyone cares about the subresource integrity stuff, so the effect of this wouldn't be noticeable
@admi Am in a place with sick bandwidth but awful computer so this seems backwards to me. But I get that my experience isn’t universal
What is the exact problem you're worried about?
If it's disk usage, your browser will generally cache assets for some time anyway, and in cases where this approach would be effective those filed would probably be duplicated anyway (different servers serving the same file)
If it's speed, your browser will already check the integrity of the file using the same exact checksum anyway, and the extension would only need to check once when downloading, as the browser would (probably) verify it each time it's used assuming the way you inject the local asset isn't bypassing the native integrity check.
Considering the background wget I'm running is at it's 4th try with speeds as low as 10-20 KB/s, I'd expect the more agressive caching to have plenty of uses.
Personal server. Totally overkill but ok.