Skip to content

Conversation

@hamishwillee
Copy link
Collaborator

@hamishwillee hamishwillee commented Oct 17, 2025

FF135 adds support for the Idempotency-Key header behind a preference - I'm working on this because there was an abortive attempt to ship in 145.

This allows a client to make a POST or PATCH request idempotent, so that if the client doesn't receive a response it can safely resend the request without having to worry about whether the server already acted on it and the response was just lost.

The key is sent in each new requests to indicate that a POST/PATCH is a particular unique command. If the server gets the same request with the same key it doesn't act on it after the first time, but responds as though it had. The key and error response format is defined by the server.

Related docs work can be tracked in #41497

@github-actions github-actions bot added the Content:HTTP HTTP docs label Oct 17, 2025
@github-actions github-actions bot added the size/m [PR only] 51-500 LoC changed label Oct 17, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2025

Preview URLs

Flaws (6)

URL: /en-US/docs/Web/HTTP/Reference/Headers
Title: HTTP headers
Flaw count: 3

  • macros:
    • Can't resolve /en-US/docs/Web/HTTP/Reference/Headers/Accept-Signature
    • Can't resolve /en-US/docs/Web/HTTP/Reference/Headers/Signature
    • Can't resolve /en-US/docs/Web/HTTP/Reference/Headers/Signed-Headers

URL: /en-US/docs/Web/HTTP/Reference/Headers/Idempotency-Key
Title: Idempotency-Key header
Flaw count: 3

  • unknown:
    • No generic content config found
    • no blog root
    • no blog root

(comment last updated: 2025-10-24 06:13:22)

Comment on lines +115 to +120
<!-- ## Browser integration -->
<!-- Firefox has a (non-standard) integration that automatically applies keys.
This is discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=1991641#c6
Since this might not survive in the shipped release it is undocumented now.
This hidden comment remains so that the possible differences are known at that point by the editor.
-->
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI NOrmally an app would set the header in JavaScript. Firefox currently does this automatically, but of course NOT to whatever standard is defined by the server. I added a note in the BCD entry for this, but the behaviour on release isn't known, so I haven't commented here. Kept a note to remind me.

@hamishwillee hamishwillee marked this pull request as ready for review October 24, 2025 06:11
@hamishwillee hamishwillee requested a review from a team as a code owner October 24, 2025 06:11
@hamishwillee hamishwillee requested review from bsmth and removed request for a team October 24, 2025 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTTP HTTP docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant