[Bug 11402] One problem of todays JavaScript libraries is, that the client has to download the same library over and over again, while visiting multiple sites. One could use services like Google Libraries API for a central location, but that introduces new points of

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11402

--- Comment #7 from Aryeh Gregor <Simetrical+w3cbug@gmail.com> 2010-11-30 17:52:18 UTC ---
(In reply to comment #5)
> (1 1 1) is the weak point here, and you haven't fixed it.  If they have a
> cached version and they see an un-updated hash that matches the cached version,
> they'll continue to get the cached version, not the newly updated one.

Yeah, but anyone who visits with a clean cache is going to get a JavaScript
error raised and the script won't load.  This will probably break the page and
thus get fixed quickly.  (If it doesn't noticeably break the page, probably
loading an old version instead won't either.)

But this just makes bitrot detectable, it doesn't make it painless.  The
feature basically says "If you use this and aren't totally sure that you're
going to update every single one of your hashes correctly, stuff will break
badly, and the only advantage is that users who don't have a library cached
from your site but for some reason do have it cached from another site will see
slightly better load times."

I don't think it's plausibly worth it.  Cache churn is too great.  The only
thing that would make it worthwhile is if browsers shipped with a standard
array of various library versions that didn't get cleared from cache -- that
would mean you have a 100% hit rate for those libraries on those browsers.

If that's the primary use, then you can make it simpler.  Just have browsers
agree on a set of standard library names to prepackage, then use something like

<script src="scripts/jquery-1.4.2.js" library="jquery-1.4.2"></script>

and browsers would agree on what the exact file for "jquery-1.4.2" is, bit for
bit.  So basically, instead of a general-purpose sharing scheme, just develop
the notion of a standard library for JS.  The set of supported libraries could
be updated out-of-band, like malware lists and so on, so users don't have to
upgrade their browsers to get the latest libraries.  (Agreeing on which
libraries you want to make standard is the tricky part, of course . . .)

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 30 November 2010 17:52:22 UTC