Integrity with Multiple Hashes

Different hash algorithms

When there are multiple hashes exist in integrity attribute separated with space, browser will use hash with strongest algorithm. In other word, hash result from sha512 is used if exists, otherwise sha384 is used. If none of them exists, hash result from sha256 will be used to validate resource.

You should be able to use querystring to control whether integrity of stylesheet has correct hash for the strongest.

Same hash algorithm

When there are multiple hashes exist in integrityattribute with same algorithm, it will only fail when all of them are incorrect matching the actual hash of resource.

This multiple hash behavior is useful when same URL is pointing to different resources based on browsers, visitor's account types, etc.

You should be able to use querystring to control whether integrity of script has one correct hash amoung all hashes in attribute.

Status of resources loading

Back