Monday, March 31st, 2008
Douglas Crockford would like to see a
hash= attribute to aid security and performance:
Any HTML tag that accepts a
href=attribute should also be allowed to take a
hash=attribute. The value of a hash attribute would be the base 32 encoding of the SHA of the object that would be retrieved. This does a couple of useful things.
First, it gives us confidence that the file that we receive is the one that we asked for, that it was not replaced or tampered with in transit.
Second, browsers can cache by hash code. If the cache contains a file that matches the requested
hash=, then there is no need to go to the network regardless of the url. This would improve the performance of Ajax libraries because you would only have to download the library once for all of the sites you visit, even if every site links to its own copy.
Posted by Dion Almaer at 8:35 am