3 ms·
What would be cool is <script sha="2afdb28d" name="angular.js" version="1.2.10" src="xxx"></script> This would mean that browser can essentially cache the exac
by antihero 13y ago
What would be cool is <script sha="2afdb28d" name="angular.js" version="1.2.10" src="xxx"></script>
This would mean that browser can essentially cache the exact version of the script from any source, verify it with a hash, and still have a fallback URL to download it from.
- arcatek 13y agoBut then the game would be to find an hash collision with a malicious code :)
- infogulch 13y agoIt should definitely require the full hash. And to make it generic... <script hash="sha-1/fa26be19de6bff93f70bc2308434e4a440bbad02" name="angular.js@1.2.10" src="xxx"></script> The name attribute would be purely aesthetic, so no reason for a version attribute. SHA-1 is good enough for git content-addressed-storage, it's good enough for browsers.