Earlier quoted context omitted.
The web is long overdue for a method to specify an exact resource, by content-hash, from one-of-whatever-sources. Those sources can then be other less-secure protocols, even those unanticipated by the referrer, because the client got the necessary verifier via the secure-path.
I believe there's already a standard HTTP header for this: Content-MD5. Browsers definitely don't cache across origins by this though. If they did, would it be possible to create a malicious JavaScript file with the same MD5 as jQuery?
You definitely wouldn't use MD5, as experts have been recommending against its use for content-security since about 1996.[2] (A practical full chosen-preimage attack hasn't yet been developed, but still, you'd design for security for the next few decades, which would mean a SHA256 or better.) The choice of a good hash would mean no one could practically create an alternate file with the same hash.