Re: Blob URLs | autoRevoke, defaults, and resolutions

On Mon, May 6, 2013 at 10:52 PM, Eric U <ericu@google.com> wrote:

>  I'm not really sure what you're saying, here.  If you want an URL to
>
expire or otherwise be revoked, no, you can't use it multiple times
> after that.  If you want it to work multiple times, don't revoke it or
> don't set oneTimeOnly.
>

No, I'm saying that APIs *internally* may perform multiple fetches, such as
if you load an API into <video> and the user performs multiple pauses and
seeks.  This should be completely transparent to script.  Similarly, if you
load blob URLs into srcset, the fact that srcset might load or reload the
images any number of times in the future due to changes to the environment
should be completely transparent to script.  There are lots of cases of
this, and we should have a simple, predictable approach to dealing with it.

At a high-level, my view is that (within reason) blobs should be captured
at the point of entry into the native API.  As soon as you say "img.srcset
= '...; blob URL; ...'", or xhr.open(objectURL), or img.src =
createObjectURL(), that point where the URL first enters the native API is
what matters.  That's a simple rule that's easy for developers to
understand in general, without needing to care about when or how many times
the fetch algorithm is run (if ever, as with srcset) on the URLs.

-- 
Glenn Maynard

Received on Tuesday, 7 May 2013 13:53:25 UTC