-
Notifications
You must be signed in to change notification settings - Fork 357
Description
<link rel=preload>
was changed to make the as
attribute mandatory. This was done so that the browser can determine what context-sensitive parameters to supply to the fetch. We should take advantage of this by calculating a fetch context from the as
attribute instead of having a preload
fetch context. For example, ``should use
style` as the fetch context. And, in particular, there should be no `preload` context. This will help ensure that all of the fetch's security checks, prioritization logic, caching header setting, etc. are consistent with what would happen in the non-preload case, so that a response from a preload will more exactly match the response that would be given from a non-preload fetch.
Note that a boolean "is this a preload" flag is still needed so that things like mixed content blocking can treat preloads specially.
Note that this would require a change to MIX, at least, because MIX should continue to block mixed-content preloads. (It already requires them to be blocked since 'preload' is not on the whitelist.) /cc @mikewest.