Re: [HTML imports]: Removing imports

I don't want to make it removable from the cache/manager. Once it is
loaded, it should be there until the page ends. Allowing
removal/cancellation has big implication that will introduce many
complicated race conditions and edge cases. For example, what happens if
<link> is removed before/while its imports are loaded?

Also, dependency resolution will become much more tricky. What happens when
the author swaps the order of successive <link>s? I'd rather think <link
import> as a one shot directive through the parser to the engine, than the
reflection of internal representation. This mental model isn't perfect
either (think about styles in import) but it's much simpler than supporting
fully-dynamic behavior.

I agree that network error and retry issue is a valid concern. However I
don't think it is good layering design to handle it in import level. It
should be addressed by lower level primitives like Service Worker, IMO.






On Fri, Jan 31, 2014 at 2:13 AM, Gabor Krizsanits
<gkrizsanits@mozilla.com>wrote:

> I've already opened a bug that import removal is not clear to me
> (https://www.w3.org/Bugs/Public/show_bug.cgi?id=24003), but there
> is more...
>
> So in one way or another imports are cached per master documents
> so if another link refers to the same import in the import tree it
> does not have to be reloaded. Question is, when to remove the import
> from the cache (let's call it import manager).
>
> One version is to release import documents when the master document
> is released. Another would be to wait until all the link elements
> that refers to it are released. But maybe it should be released the
> moment the last referring link element is detached from the
> tree... this way users could force re-try import loading. Because
> right now, if import loading failed, there is no way to re-try it.
> Any thoughts?
>
>


-- 
morrita

Received on Friday, 31 January 2014 06:16:58 UTC