Skip to content

Sec- prefix #30

Description

@martinthomson

If I had my way, the Sec- prefix would not be used as much as it is. It is not sufficient to say that because a value is populated by a user agent that a new header should use the prefix. There has to be a reason that a server might need to rely on the value in that narrow space where the user agent is honest, but the requester is not.

Here are the questions I would ask for this header:

  • If I were to use fetch() to tell a server that I have storage access, but I didn't, what harm might be inflicted?
  • If I were to lie about not having storage access, but I have it, what happens?

A cross-origin fetch with custom headers will have been preflighted and the works, so it's not clear that this field needs a prefix to protect servers from fetch callers who might want to make weird claims about storage access. As far as things go, this exists to allow a server to make a request or to adapt content to being in a cross-origin context where they don't have their unpartitioned cookies. Neither of those cases depends on the veracity of the value.

To that end, I would suggest a simpler design:

Requests say: Storage-Access: none|active|inactive
Responses say: Storage-Access: load|retry (plus parameters).

The set of valid values differ on each, but the symmetry would make this clearer for users.

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