Skip to content

Replace 'preload' context with context calculated from the |as| attribute #76

@briansmith

Description

@briansmith

<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 usestyle` 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions