joepeck02 at gmail.com
Tue Jul 14 09:03:15 PDT 2009
> But linking external scripts does have a problem in that you have to
> trust the site you're linking not to change the script (or get
> compromised) to add malicious features. A cryptographic hash of the
> file you expect could be used to mitigate this issue, perhaps for
> other types of file too. And such a feature could fall within
> HTML5's purview.
> For example:
> <link rel="stylesheet" type="text/css"
This idea makes sense, but it would still need a fallback script if
the linked to version doesn't work, and you could use that to point to
the backup file on your own server (equivalent to the src="" attribute).
However, this wouldn't work in older browsers. Thats why I wanted the
"proactive" search to be something other then the src attribute, have
that used first, and fallback to the src attribute in case something
goes wrong. This would degrade gracefully.
More information about the whatwg