[rel=preload] as="fetch" preload support
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: mayhemer, Assigned: mayhemer)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Part of Design documentation for rel=preload
Please see the implementation notes for “fetch” type.
The idea is to have a loader - in this case more a preloader - that can be used to preload any "as" type of resource. Primarily it will be used for "fetch", but we may also want to use it for "font" (in a different bug).
The fetch loader should hang off the document as all other loaders (script, style, ...) do.
It will provide a method taking a channel and a key (as defined in the design doc). It will asyncOpen the channel with a class derived from PreloaderBase class as the listener, and register it in Document.PreloadService, similarly as we want for other loaders in bug 1618292 el al. There is no need to do anything else, this exposes the preload data and status in Document.PreloadService under the key for <link rel=preload> DOM nodes and final data consumers, like fetch and XHR.
There will be no coalescing inside the loader, it's up to the callers to coalesce by checking Document.PreloadService.LookupPreload for the key.
Wondering if this could be reduced to a helper static function only, taking Document, nsIChannel and key as only arguments, possibly returning PreloaderBase as a result for use.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Comment 3•5 years ago
|
||
bugherder |
Comment 4•5 years ago
|
||
Comment 6•5 years ago
|
||
bugherder |
Assignee | ||
Comment 7•5 years ago
|
||
Thanks, Geoff!
Description
•