3 ms·
If you change the file the hash changes
by dexterdog 2y ago
If you change the file the hash changes
- pornel 2y agoThe hash is sent separately from the file. For it to change in the HTML and other places linking to it, there has to be some mechanism to update the links, and that is the part that can get out of sync or bitrot.
- dexterdog 2y agoWhich is part of the security of the hash. When I embed a script on my site I get the hash at the time I test it. If the content changes without my knowledge it will not allow a replacement from the source. Assets are not overly cacheable if they don't change the location when the file changes.