Skip to content
ferkesh.HOSTING

Verify Subresource Integrity for Versioned Website Assets

Subresource Integrity lets a browser check a fetched script or stylesheet against a digest. A mismatch blocks the resource. Pinning the file and its integrity metadata to the same release is important.

Pinned asset: Stable file bytes; Metadata: Matching encoded digest; Browser check: Load or block.

Choose a stable file

On staging identify a versioned asset with known bytes. Compute the supported integrity value using an approved build process. A hexadecimal checksum is not the Base64 digest notation expected by HTML integrity metadata. Record the filename and digest format.

Test the expected response

For another origin, confirm CORS and the appropriate crossorigin attribute. Inspect the browser network and console. On your own staging fixture, check failure behavior with an intentionally mismatched digest and restore the approved metadata before continuing.

Keep URLs and hashes together

Deploy the new versioned URL and matching digest as one reviewed change. Recheck critical flows and keep the previous matching pair for rollback. If a supplier changes an unversioned asset unexpectedly, inspect the changed file before approving its bytes.

Ferkesh Tools

Official references

Last reviewed .

هل كان هذا مفيدًا؟

شكرًا على ملاحظاتك!

هل ما زلت بحاجة إلى مساعدة؟

فريق الدعم متاح على مدار الساعة لمساعدتك في كل ما لم تجده في قاعدة المعرفة.