You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTML forms do not support the PUT, PATCH and DELETE methods #3577
Hi! This is my first issue in this repository, I'm sorry if I'm opening this discussion in the wrong place. I searched the mailing list archives and issues for this topic but couldn't find a relevant discussion.
The spec says that the <form>method attribute assumes one of three values: get, post, and dialog.
Can we add support for the put, patch, and delete methods for this attribute?
Reacted by Snuggs, Keith Cirkel, Rúnar Berg Baugsson Sigríðarson, lpd-au, BinotaLIU, Bruno Heridet, JingAn Chen, johannesrave, Jimmy Wärting, SeungBin Kim and 181 more
Reacted by Snuggs, lpd-au, Mykal Machon, Matheus Richard, Kevin Erdiza Yogatama, Jeremy Howard, Viktor Holmberg, Austin Daniel, Michael Kohl, YThomassenAtabix and 22 more
Reacted by Snuggs, Yang Jun, lpd-au, Torleif Berger, Kai Norman Clasen, Matheus Richard, Tom Adler, Isaiah Thomason, Péter Farkas, Kevin Erdiza Yogatama and 38 more
Reacted by nielsle, Konnor Rogers, Simon Martens, michael-plantstein, Adam Shand, Samuel Domínguez Lorenzo, hmmh-dominik-saeume and Rob Cresswell
Probably not as that would complicate the processing model for <form> quite significantly. In particular, the same origin policy exceptions <form> has today do not allow for these methods. Either we have to forbid them in cross-origin requests or require CORS somehow. Both of those restrictions would be a first for navigations and rather risky.
Reacted by Thayne McCombs, alto and jub0bs
Reacted by Andrea Pappacoda and hmmh-dominik-saeume
As a developer, I would love this feature. Those of us who are still interested in this sort of feature may want to make a new thread in the WICG Discourse forum and post their use cases there.
Reacted by lpd-au, CleverLemming1337, Viktor Holmberg, Tushar Sadhwani, alto, Simon Martens, nielsle and Judah
Indeed—if I recall, Hickson said long ago that there weren’t clear use cases for them…or was that for JSON form data? Well, either way, that’s why any chance of this happening would require assembling compelling use cases for them and marshaling both coordinated community support and a reasonable specification for the vendors. A tall order, but less likely things have happened…
@annevk thanks for the context, I suspected this would have came up previously. Where would discussion from the previous attempts have taken place? They would be interesting to read.
As an update, #3577 (comment) still applies. We cannot bypass the same-origin policy and enforcing CORS is theoretically possible, but would require integration of that to some extent with navigation, which is completely new ground. Maybe if something like https://wicg.github.io/cors-rfc1918/ motivated adding such complexity to navigation this would become more feasible. But until that happens this isn't worth the significant cost unfortunately.
In particular, the same origin policy exceptions <form> has today do not allow for these methods.
Thanks for your comments @annevk. Can you point me in the direction of where these exceptions are specified? Between GET and POST, they seem to have every property of PUT and DELETE covered; request body, idempotency, navigation, etc... does it raise a fresh security concern or is this a legacy issue where the specification that defines the exceptions repeats only the HTML 4 form methods by name?
Either we have to forbid them in cross-origin requests or require CORS somehow. Both of those restrictions would be a first for navigations and rather risky.
To me, implementing PUT and DELETE with a same-origin policy seems like a sensible minimum viable product, which would at least allow web developers to create html clients for their own REST services. Implementer interest permitting, this could later be extended with CORS support for both PUT and DELETE methods (opt-out) and GET and POST methods (opt-in). Could you also please elaborate on why you previously considered a same-origin policy for PUT and DELETE forms to be 'risky', and whether you still believe this to be the case? How does this compare to, for example:
POSTing to a cross-origin HTTPS resource with an invalid TLS certificate configuration, or
GETting a resource when the network is disconnected/offline, or
HTML defines part of it and so does https://fetch.spec.whatwg.org/. And yes, what HTML forms can do are basically the enshrined exception.
A same-origin mode would similarly be risky (and unclear) as navigation does not have that primitive. So you'd have to define what happens if you get a cross-origin redirect and how that would be handled and such. And come to think of it, there's also a couple POST-specific code paths that would have to be generalized somehow.
HTML defines part of it and so does https://fetch.spec.whatwg.org/. And yes, what HTML forms can do are basically the enshrined exception.
That is to say, the exception could be extended if the specification editors such as yourself thought it prudent? There is no immovable W3C charter issue, for example, or fresh security concern that does not apply to the existing methods?
A same-origin mode would similarly be risky (and unclear) as navigation does not have that primitive. So you'd have to define what happens if you get a cross-origin redirect and how that would be handled and such. And come to think of it, there's also a couple POST-specific code paths that would have to be generalized somehow.
I'm afraid I still don't understand. Perhaps you could define what you mean by risky, or elaborate what some of the risks are? Is there an inherent problem or insurmountable issue with having to define how redirects are handled, or generalising code previously implemented to handle POST? Is this not still significantly less complex than CORS support?
But in the context of a browser form, the client has no way of knowing if it is safe to retry, wheras if the method is DELETE, then the browser knows if the request fails, it can safely make the request again. So while the operation can be done with POST, DELETE would be better.
So you think the browser should automatically retry unsafe requests (DELETE, PUT), simply because they're supposed to be idempotent? Sounds dangerous to me.
Reacted by Ondra Pelech, Herbert Snorrason, ingen-philip, Jelle Roorda and aekah
So you think the browser should automatically retry unsafe requests (DELETE, PUT), simply because they're supposed to be idempotent? Sounds dangerous to me.
How is that different from GET, which can also be incorrectly implemented in an unsafe way?
Reacted by Lego, Joe Taber, Jelle Roorda and aekah
How is that different from GET, which can also be incorrectly implemented in an unsafe way?
I mean, sure... you can shoot yourself in the foot all kinds of ways. But destructive operations are not the primary use case for GET requests. Whereas DELETE is by its very nature destructive.
Put another way: an inexperienced or careless developer might accidentally implement some unsafe operation behind a GET request. But DELETE and PUT are unsafe by definition. And I think it would be a mistake for browsers to retry these automatically, without user confirmation.
Ultimately, the methods should be chosen by the origin server and communicated somehow to the client via the media type or relationship processing rules. If the choice of method doesn’t make any difference to the other components (i.e., neither client nor intermediaries gain any value by using PUT or PATCH over POST), then we should admit that it just doesn’t matter to the architectural style.
👆 This is exactly the point.
But it does “make a difference to the other components” because POST does not make the useful guarantees that other methods do. Take this for instance:
So you think the browser should automatically retry unsafe requests (DELETE, PUT), simply because they're supposed to be idempotent? Sounds dangerous to me.
Yes, they can do that with unsafe idempotent requests, and no it is not dangerous. That’s the whole point of defining them to be idempotent – there is no difference between making the request once or several times.
A request for DELETE /foo and a hundred requests for DELETE /foo are semantically equivalent – the result is that the /foo resource is deleted no matter how many times you make the request. The same is not true for POST /foo, which is why browsers and proxies can automatically retry with DELETE but cannot automatically retry with POST. This provides the value to the client and intermediaries that Fielding was talking about – the narrower semantics make the methods more useful. It’s an example of the principle of least power in action.
This is also not "RPC", in which the procedure to be called is tunneled via some completely opaque protocol such as SOAP. Every query and command resource has its own unique identity. And the query resources, which use GET, all benefit from caching intermediaries.
“RPC” does not mean “tunnelling”, it means “remote procedure call”. You are telling us to stop thinking in terms of hypermedia (“stop thinking of resources as data”) and instead think in terms of RPC (“instead think of them as commands and queries”). It doesn’t matter how opaque or transparent the RPC call is in terms of the transport protocol; you are advocating RPC over HTTP instead of hypermedia.
Reacted by Alex Neumann, Thayne McCombs, Herbert Snorrason, Joe Taber, ingen-philip, Jelle Roorda, aekah and Ondra Pelech
Hypermedia has nothing to do with HTTP method semantics. It has to do with the server telling the client which state transitions are available for the current resource, rather than the client making assumptions based on convention or prior knowledge.
That's all. The method semantics are a completely separate concern from hypermedia.
And I don't discourage "resources as data". It's true that if you're working with an API that treats resources as data, then HTTP CRUD conventions are much more relevant - especially in the absence of hypermedia. And certainly, allowing forms to make PUT and DELETE requests would be useful in that context.
And if that's how you want to architect your application/APIs, that's perfectly fine! You'll get zero argument from me.
All I'm saying is that you don't have to think of resources as data. There's a different mental model that is equally valid, and aligns perfectly with the architecture of the web, and the original definition of REST.
In a traditional server-rendered HTML application, resources represent application state (that is, what "state" your application is in), not data. And the available state transitions are expressed as hypermedia within the resource itself (links and forms). This is what the infamous unpronounceable acronym HATEOAS describes: Hypermedia as the Engine of Application State. This treats the browser not as a runtime host for a client-side JS application that calls some APIs, but as a universal client application unto itself, whose UI is entirely driven by the server. This is the architecture described in Fielding's original REST dissertation.
There is a subtle disinction between deleting a resource, and posting a request to delete some underlying data. Neither is more correct. Just different.
Just as a thought experiment, consider the following scenario:
You have an HTTP backend that allows you to delete things via DELETE /things/foo. And let's say this proposal goes through, and you can then write a form like this in HTML:
But... suppose a new business requirement emerges: In order to delete a thing, the user must include a comment, explaining why they are deleting the thing. How would you implement this requirement?
But where should the "reason" field go, in the DELETE request when you submit this form?
In the Request Body?
That feels like the most sensible place for it. But sadly this is not broadly reliable - particularly when you don't know/control all the intermediaries.
content received in a DELETE request has no generally defined semantics, cannot alter the meaning or target of the request, and might lead some implementations to reject the request and close the connection because of its potential as a request smuggling attack. [...] A client SHOULD NOT generate content in a DELETE unless it is made directly to an origin server that has previously indicated [...] will be adequately supported. An origin server SHOULD NOT rely on private agreements to receive content, since participants in HTTP communication are often unaware of intermediaries along the request chain
In the Request Headers?
Maybe a custom request header like x-reason: blah+blah+blah...?
But request headers have effective size limits (which vary by client, server, and intermediaries). So if the user types a moderately long explanation, they could easily end up with a 431 Request Header Fields Too Large error.
In the Query String?
Of course not. That would change the URL, implying you're deleting /things/foo?reason=... rather than deleting /things/foo.
The moment you need to convey anything remotely more complex than DELETE /things/foo, you have no choice but to embrace something like POST /things/foo/delete, which, according to some in this thread, would violate the holy purity of HTTP semantics! 🙂
Again. I have no beef with this proposal, nor with HTTP CRUD-style APIs in general. What I'm pushing back against is the pedantic assertion that using POST for actions that may have similar semantics to other HTTP methods is inherently wrong. It's not.
Pedantically, I feel like in that case you're PUTting a tombstone, not actually deleting the resource.
Let the bike shedding begin. 🤣
PUTting a "tombstone" is even less semantically correct. That's like replacing a file with a new file that says it's deleted, rather than actually deleting it. It makes it even harder for intermediaries - even bespoke ones - to reason about the request, as the actual operation (delete) is now hidden entirely in the request body, masquerading as an update, and indistinguishable from other PUT requests.
The "reason" field in my example is not a property of the deleted resource. It's a property of the operation itself. It may end up in an audit log or a notification email, or wherever. But it makes zero sense to PUT it to /things/foo. It is much more honest and logical to POST /things/foo/delete - meaning, you are posting a "request to delete some data, for this reason".
Contorting your domain model to try to fit HTTP CRUD semantics is precisely the sort of thing that prompted Fielding's "It is okay to use POST" article in the first place.
In the interest of the people watching this thread to track the issue at hand, please try to keep discussion about the merits of the proposal itself. Last update on that is up here.
Reacted by jlunman, Joe Taber, Lego, Winston Cooke, Jim Dabell, Leonardo Couto Chueri, nielsle, Jelle Roorda and Rob Cresswell
Well, I did stir the pot a bit by sharing Fielding's blog post and sharing an alternate perspective. But I respect that this is not the proper forum for that debate, so - apologies.
In regards to the proposal itself, I do have some safety concerns that I have voiced here in the past - especially the fact that browsers currently fallback to GET if the method attribute is any value other than GET or POST, and what that could mean for information leakage given the long tail of old browsers still in use. This would seem to be addressed by the proposed custommethod attribute. So <form method="post" custommethod="put"> would perform a PUT on browsers that support it, and POST on those that don't. I think it could be a bit confusing to see both method and custommethod attributes on a form, with values that seem to contradict each other, but I don't really have a better solution to offer there. (Mildly, I would prefer httpmethod over custommethod as that's a little bit more explicit, but I don't feel strongly about it, and maybe that only makes sense if the action uses the http protocol.)
I definitely think it's worth debating whether browsers should automatically resubmit unsafe idempotent methods without user confirmation. At the very least, I'd want there to be a browser setting for that. And if they do automatically re-submit, what's the retry interval and limit?
I definitely think it's worth debating whether browsers should automatically resubmit unsafe idempotent methods without user confirmation. At the very least, I'd want there to be a browser setting for that. And if they do automatically re-submit, what's the retry interval and limit?
If the origin is struggling with server load automatic retries could DDOS the server.
@jlunman I added httpmethod/custommethod as a possibility in response to your original comment in 2024, as I share those concerns. Either name would be fine, I think, and I'd definitely be open to better ideas if people have them. This proposal makes no changes to the browser's handling of unsafe, idempotent requests, so it's not on-topic for this issue. I addressed Mike's ETag proposal in this comment, and the tl;dr is that it's good idea, but not in scope for this issue.
I definitely think it's worth debating whether browsers should automatically resubmit unsafe idempotent methods without user confirmation.
The entire point of including the concept of idempotency in HTTP is to enable this behaviour. It’s a deliberate design decision that doesn’t need to be re-litigated here. See RFC 9110: HTTP Semantics § 9.2.2: Idempotent Methods:
A request method is considered "idempotent" if the intended effect on the server of multiple identical requests with that method is the same as the effect for a single such request. Of the request methods defined by this specification, PUT, DELETE, and safe request methods are idempotent.
Idempotent methods are distinguished because the request can be repeated automatically if a communication failure occurs before the client is able to read the server's response. For example, if a client sends a PUT request and the underlying connection is closed before any response is received, then the client can establish a new connection and retry the idempotent request. It knows that repeating the request will have the same intended effect, even if the original request succeeded, though the response might differ.
There’s no reason to include idempotency in HTTP except to enable this kind of behaviour. It’s a deliberate part of HTTP, put in there to explicitly allow automatically resubmitting unsafe requests. HTTP was designed specifically with this in mind.
Reacted by Joe Taber, ingen-philip and Jelle Roorda
@JimDabell That's fair. And I guess it really depends on the nature of the "failure". If the server responds with a 500 error, browsers do not automatically retry even a GET request. But they may retry a GET in the event of a network communication failure. And per that same spec, they should only retry once ("A client SHOULD NOT automatically retry a failed automatic retry."), so that should alleviate any DDOS concerns raised by @matthewquinn.
Anyway, @alexpetros already stated this is not in scope for his proposal.
Activity
annevk commentedon Mar 19, 2018
Probably not as that would complicate the processing model for
<form>quite significantly. In particular, the same origin policy exceptions<form>has today do not allow for these methods. Either we have to forbid them in cross-origin requests or require CORS somehow. Both of those restrictions would be a first for navigations and rather risky.js-choi commentedon Mar 21, 2018
As a developer, I would love this feature. Those of us who are still interested in this sort of feature may want to make a new thread in the WICG Discourse forum and post their use cases there.
annevk commentedon Mar 22, 2018
Just know it's been attempted several times in the past and implementers have rejected it.
annevk commentedon Mar 22, 2018
(It even used to be part of Web Forms 2.0.)
js-choi commentedon Mar 22, 2018
Indeed—if I recall, Hickson said long ago that there weren’t clear use cases for them…or was that for JSON form data? Well, either way, that’s why any chance of this happening would require assembling compelling use cases for them and marshaling both coordinated community support and a reasonable specification for the vendors. A tall order, but less likely things have happened…
annevk commentedon Mar 22, 2018
I am pretty sure that the main reason implementers have rejected it is complexity.
ericandrewlewis commentedon Mar 22, 2018
@annevk thanks for the context, I suspected this would have came up previously. Where would discussion from the previous attempts have taken place? They would be interesting to read.
annevk commentedon Mar 22, 2018
https://www.w3.org/Bugs/Public/show_bug.cgi?id=10671 seems to have a lot of it, though not as much the implementer angle.
annevk commentedon May 7, 2020
As an update, #3577 (comment) still applies. We cannot bypass the same-origin policy and enforcing CORS is theoretically possible, but would require integration of that to some extent with navigation, which is completely new ground. Maybe if something like https://wicg.github.io/cors-rfc1918/ motivated adding such complexity to navigation this would become more feasible. But until that happens this isn't worth the significant cost unfortunately.
lpd-au commentedon May 8, 2020
Thanks for your comments @annevk. Can you point me in the direction of where these exceptions are specified? Between GET and POST, they seem to have every property of PUT and DELETE covered; request body, idempotency, navigation, etc... does it raise a fresh security concern or is this a legacy issue where the specification that defines the exceptions repeats only the HTML 4 form methods by name?
To me, implementing PUT and DELETE with a same-origin policy seems like a sensible minimum viable product, which would at least allow web developers to create html clients for their own REST services. Implementer interest permitting, this could later be extended with CORS support for both PUT and DELETE methods (opt-out) and GET and POST methods (opt-in). Could you also please elaborate on why you previously considered a same-origin policy for PUT and DELETE forms to be 'risky', and whether you still believe this to be the case? How does this compare to, for example:
annevk commentedon May 8, 2020
HTML defines part of it and so does https://fetch.spec.whatwg.org/. And yes, what HTML forms can do are basically the enshrined exception.
A same-origin mode would similarly be risky (and unclear) as navigation does not have that primitive. So you'd have to define what happens if you get a cross-origin redirect and how that would be handled and such. And come to think of it, there's also a couple POST-specific code paths that would have to be generalized somehow.
lpd-au commentedon May 8, 2020
That is to say, the exception could be extended if the specification editors such as yourself thought it prudent? There is no immovable W3C charter issue, for example, or fresh security concern that does not apply to the existing methods?
I'm afraid I still don't understand. Perhaps you could define what you mean by risky, or elaborate what some of the risks are? Is there an inherent problem or insurmountable issue with having to define how redirects are handled, or generalising code previously implemented to handle POST? Is this not still significantly less complex than CORS support?
41 remaining items
jlunman commentedon Apr 7, 2026
So you think the browser should automatically retry unsafe requests (DELETE, PUT), simply because they're supposed to be idempotent? Sounds dangerous to me.
anarchodin commentedon Apr 8, 2026
How is that different from GET, which can also be incorrectly implemented in an unsafe way?
jlunman commentedon Apr 8, 2026
I mean, sure... you can shoot yourself in the foot all kinds of ways. But destructive operations are not the primary use case for
GETrequests. WhereasDELETEis by its very nature destructive.Put another way: an inexperienced or careless developer might accidentally implement some unsafe operation behind a
GETrequest. ButDELETEandPUTare unsafe by definition. And I think it would be a mistake for browsers to retry these automatically, without user confirmation.JimDabell commentedon Apr 8, 2026
But it does “make a difference to the other components” because
POSTdoes not make the useful guarantees that other methods do. Take this for instance:Yes, they can do that with unsafe idempotent requests, and no it is not dangerous. That’s the whole point of defining them to be idempotent – there is no difference between making the request once or several times.
A request for
DELETE /fooand a hundred requests forDELETE /fooare semantically equivalent – the result is that the/fooresource is deleted no matter how many times you make the request. The same is not true forPOST /foo, which is why browsers and proxies can automatically retry withDELETEbut cannot automatically retry withPOST. This provides the value to the client and intermediaries that Fielding was talking about – the narrower semantics make the methods more useful. It’s an example of the principle of least power in action.“RPC” does not mean “tunnelling”, it means “remote procedure call”. You are telling us to stop thinking in terms of hypermedia (“stop thinking of resources as data”) and instead think in terms of RPC (“instead think of them as commands and queries”). It doesn’t matter how opaque or transparent the RPC call is in terms of the transport protocol; you are advocating RPC over HTTP instead of hypermedia.
jlunman commentedon Apr 8, 2026
Hypermedia has nothing to do with HTTP method semantics. It has to do with the server telling the client which state transitions are available for the current resource, rather than the client making assumptions based on convention or prior knowledge.
That's all. The method semantics are a completely separate concern from hypermedia.
And I don't discourage "resources as data". It's true that if you're working with an API that treats resources as data, then HTTP CRUD conventions are much more relevant - especially in the absence of hypermedia. And certainly, allowing forms to make PUT and DELETE requests would be useful in that context.
And if that's how you want to architect your application/APIs, that's perfectly fine! You'll get zero argument from me.
All I'm saying is that you don't have to think of resources as data. There's a different mental model that is equally valid, and aligns perfectly with the architecture of the web, and the original definition of REST.
In a traditional server-rendered HTML application, resources represent application state (that is, what "state" your application is in), not data. And the available state transitions are expressed as hypermedia within the resource itself (links and forms). This is what the infamous unpronounceable acronym HATEOAS describes: Hypermedia as the Engine of Application State. This treats the browser not as a runtime host for a client-side JS application that calls some APIs, but as a universal client application unto itself, whose UI is entirely driven by the server. This is the architecture described in Fielding's original REST dissertation.
There is a subtle disinction between deleting a resource, and posting a request to delete some underlying data. Neither is more correct. Just different.
jlunman commentedon Apr 8, 2026
Just as a thought experiment, consider the following scenario:
You have an HTTP backend that allows you to delete things via
DELETE /things/foo. And let's say this proposal goes through, and you can then write a form like this in HTML:Great! No complaints.
But... suppose a new business requirement emerges: In order to delete a thing, the user must include a comment, explaining why they are deleting the thing. How would you implement this requirement?
Maybe like this?
But where should the "reason" field go, in the
DELETErequest when you submit this form?In the Request Body?
That feels like the most sensible place for it. But sadly this is not broadly reliable - particularly when you don't know/control all the intermediaries.
Per RFC-9110
In the Request Headers?
Maybe a custom request header like
x-reason: blah+blah+blah...?But request headers have effective size limits (which vary by client, server, and intermediaries). So if the user types a moderately long explanation, they could easily end up with a
431 Request Header Fields Too Largeerror.In the Query String?
Of course not. That would change the URL, implying you're deleting
/things/foo?reason=...rather than deleting/things/foo.The moment you need to convey anything remotely more complex than
DELETE /things/foo, you have no choice but to embrace something likePOST /things/foo/delete, which, according to some in this thread, would violate the holy purity of HTTP semantics! 🙂Again. I have no beef with this proposal, nor with HTTP CRUD-style APIs in general. What I'm pushing back against is the pedantic assertion that using
POSTfor actions that may have similar semantics to other HTTP methods is inherently wrong. It's not.legowerewolf commentedon Apr 8, 2026
Pedantically, I feel like in that case you're
PUTting a tombstone, not actually deleting the resource.jlunman commentedon Apr 8, 2026
Let the bike shedding begin. 🤣
PUTting a "tombstone" is even less semantically correct. That's like replacing a file with a new file that says it's deleted, rather than actually deleting it. It makes it even harder for intermediaries - even bespoke ones - to reason about the request, as the actual operation (delete) is now hidden entirely in the request body, masquerading as an update, and indistinguishable from other PUT requests.
The "reason" field in my example is not a property of the deleted resource. It's a property of the operation itself. It may end up in an audit log or a notification email, or wherever. But it makes zero sense to
PUTit to/things/foo. It is much more honest and logical toPOST /things/foo/delete- meaning, you are posting a "request to delete some data, for this reason".Contorting your domain model to try to fit HTTP CRUD semantics is precisely the sort of thing that prompted Fielding's "It is okay to use POST" article in the first place.
alexpetros commentedon Apr 8, 2026
In the interest of the people watching this thread to track the issue at hand, please try to keep discussion about the merits of the proposal itself. Last update on that is up here.
matthewquinn commentedon Apr 8, 2026
Jlunman's comments are about the feasibility and practicability of this solution...
jlunman commentedon Apr 8, 2026
Well, I did stir the pot a bit by sharing Fielding's blog post and sharing an alternate perspective. But I respect that this is not the proper forum for that debate, so - apologies.
In regards to the proposal itself, I do have some safety concerns that I have voiced here in the past - especially the fact that browsers currently fallback to
GETif themethodattribute is any value other thanGETorPOST, and what that could mean for information leakage given the long tail of old browsers still in use. This would seem to be addressed by the proposedcustommethodattribute. So<form method="post" custommethod="put">would perform aPUTon browsers that support it, andPOSTon those that don't. I think it could be a bit confusing to see bothmethodandcustommethodattributes on a form, with values that seem to contradict each other, but I don't really have a better solution to offer there. (Mildly, I would preferhttpmethodovercustommethodas that's a little bit more explicit, but I don't feel strongly about it, and maybe that only makes sense if the action uses the http protocol.)I definitely think it's worth debating whether browsers should automatically resubmit unsafe idempotent methods without user confirmation. At the very least, I'd want there to be a browser setting for that. And if they do automatically re-submit, what's the retry interval and limit?
I'm also curious whether @mamund's idea regarding the use of ETag and Last-Modified headers to allow for conditional requests has made it into the proposal. I didn't see it at a glance, but I like it in principle.
matthewquinn commentedon Apr 8, 2026
If the origin is struggling with server load automatic retries could DDOS the server.
alexpetros commentedon Apr 8, 2026
@jlunman I added
httpmethod/custommethodas a possibility in response to your original comment in 2024, as I share those concerns. Either name would be fine, I think, and I'd definitely be open to better ideas if people have them. This proposal makes no changes to the browser's handling of unsafe, idempotent requests, so it's not on-topic for this issue. I addressed Mike's ETag proposal in this comment, and the tl;dr is that it's good idea, but not in scope for this issue.JimDabell commentedon Apr 9, 2026
The entire point of including the concept of idempotency in HTTP is to enable this behaviour. It’s a deliberate design decision that doesn’t need to be re-litigated here. See RFC 9110: HTTP Semantics § 9.2.2: Idempotent Methods:
There’s no reason to include idempotency in HTTP except to enable this kind of behaviour. It’s a deliberate part of HTTP, put in there to explicitly allow automatically resubmitting unsafe requests. HTTP was designed specifically with this in mind.
jlunman commentedon Apr 9, 2026
@JimDabell That's fair. And I guess it really depends on the nature of the "failure". If the server responds with a 500 error, browsers do not automatically retry even a
GETrequest. But they may retry aGETin the event of a network communication failure. And per that same spec, they should only retry once ("A client SHOULD NOT automatically retry a failed automatic retry."), so that should alleviate any DDOS concerns raised by @matthewquinn.Anyway, @alexpetros already stated this is not in scope for his proposal.