What is the 'SubResource Integrity (SRI)' hash format and what happens when the hash doesn't match?
- A.If the SRI hash doesn't match, the browser downloads the resource from the specified fallback CDN
- B.SRI hashes are only verified if the resource is served over HTTP; HTTPS resources skip SRI checking
- C.If the hash doesn't match, the browser silently falls back to loading the resource without integrity checking
- D.SRI uses the format integrity='sha384-{base64-encoded-hash}'. If the browser downloads the resource and the computed hash doesn't match the declared value, the browser refuses to load or execute the resource and generates a CSP-style violation report (if report-uri is configured). The page continues loading without the failed resource
Why D is correct