Subresource Integrity (SRI) is a security feature that enables browsers to verify that files they fetch are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched file must match.
Because SRI verifies full contents of the file, changing even one byte will cause the verification to fail. For this reason, you must only use SRI with links that are guaranteed to never change. Only use SRI with full single-file links, and static versions. For example:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="></script>
The purpose of version aliasing is getting automatic updates. This obviously means the code can change any time.
default filesDefault file are automatically minified, so the reasons for minified files apply here as well.
files minified on-demandMinifying the exact same source code multiple times might not result in the exact same generated code. While we store all generated files in our permanent storage, we might need to re-minify the file in certain situation, e.g., as a part of failover, if our storage provider goes down.
combined filesCombining the exact same source code multiple times might not result in the exact same generated code. There might be subtle changes over time, e.g. in added whitespace, caused by changes in our code. While we store all generated files in our permanent storage, we might need to re-combine the files in certain situation, e.g., as a part of failover, if our storage provider goes down.