Extensible Web Resource Loading Manifesto
These content-type defaults are reasonable for the majority of cases, but they are insufficient for delivering an extensible and perf-friendly platform. In fact, the lack of app-level control over these fetching decisions is the root cause of the vast majority of resource loading performance problems that developers have to fight with today - delayed fetches, unwanted lazyloading, eager fetching of non-critical resources, and so on.
Extensible resource fetching
To deliver on the [extensible web promise][ext], each resource fetch must provide the following features:
- The browser may initialize fetch defaults for each resource, just as it does today.
- The developer must be able to:
- Modify default fetch settings of all requests initiated via JS, CSS, and HTML. 1
- Define the preloader policy for any resource declared in CSS and HTML. 2
- Define the fetch dispatch policy for any resource declared in CSS and HTML. 3
Every element, function (CSS or JS), or other means of initiating a resource fetch must meet these criteria to provide a consistent, extensible, and a perf-friendly platform. If you are defining a new platform feature that initiates a resource fetch, you should be required to explain how the above is possible; each relevant working group needs to tackle the question of how to effectively retrofit above requirements to existing mechanisms.
- ability to define transport-layer resource allocation.</ul>
- It should be possible to extend the preload scanner with custom logic. E.g...
- opt-in a new custom element, or opt-out any existing HTML element.
- opt-in a CSS resource for preloader processing, and so on. </ul>
- Opt-out from CSS lazyloading and browser-specific heuristics that may delay fetch dispatch.
## A few broken examples...
* Image fetching
* There is no way to modify default image fetch settings
* Image CSS declarations have no opt-out strategy from lazyloading
* Image fetch may be delayed in some browsers due to page structure heuristics
* Font fetching
* There is no way to modify default font fetch settings
* Font CSS declarations have no opt-out from CSS lazyloading
* Font CSS declarations have no opt-in for preloader processing