One script tag, six checks
- Parse the hash list. Keep only entries with a known prefix:
sha256-,sha384-,sha512-. Unknown prefixes are ignored.
No valid entries left: the tag behaves as ifintegritywere absent - Fetch in CORS mode.
crossorigin="anonymous"makes the request a CORS request.
Cross-origin, noAccess-Control-Allow-Origin: blocked before hashing - Decode the body. Transport compression such as gzip is removed first, so it never changes the hash.
- Pick the strongest algorithm present. SHA-512 beats SHA-384 beats SHA-256. Weaker entries are discarded, even if they would match.
- Hash and compare. Any one entry of the strongest algorithm may match.
No match: blocked, console reports the computed digest - Execute or apply.
Bytes are exactly what the page author pinned
