Do not let your CDN betray you: use subresource integrity (2015)
It'd be cool if the browser used this to allow cross-origin caching as well.<p>Say I have jQuery previously loaded a page that included jQuery from CDNJS and now I'm in China and another site tries to load jQuery from Google's CDN.<p>Currently that request would get blocked by the great firewall. But since the browser should know that this file matches one it has seen (and cached) before it should be able to just serve the cached file.<p>This could also save a network request even if I'm linking to a self-hosted file on my own servers if I include the hash.