Firefox3 to support cross-site sharing of js libraries?
Here’s some talk on this, over at the mozilla.dev.platform list.
This is a proposal for extending the script tag of HTML.
libraries that are now in common use (prototype, dojo, scriptaculous, e.t.c.) by many different sites
and minimize bandwidth – download times.
why do I have to redownload it while visiting site Z ?
So, I propose adding a hash attribute to the script tag. A browsers behaviour will go like this:
- if a script tag doesn’t have a hash attribute, continue as normal.
- If found, use library from cache.
- Otherwise, download library and use it. Also, compute its hash, and if it matches the hash attribute add
it in global cache.
So, what’s your opinion on this? Do you see any potential (security) problems?