logoalt Hacker News

CodesInChaostoday at 12:27 PM8 repliesview on HN

I wonder if HTML forms will add support for QUERY:

    <form action="..." method="query">
This would avoid the annoying re-submission warnings you're getting if you refresh a page that was returned by a POST form submission, since QUERY is required to be idempotent.

Replies

acabaltoday at 4:44 PM

Supporting more than GET/POST in HTML forms has been my dream for decades. There's a WHATWG proposal to do just that if you want to add your voice: https://github.com/whatwg/html/pull/11347

show 1 reply
paradox460today at 6:23 PM

They never added support for any other verbs, but it's a brave new world, so who knows

bob1029today at 1:03 PM

This is better solved with the post redirect get pattern.

show 1 reply
amlutotoday at 2:39 PM

One oddity of forms: the result of a form POST is a page that has a location (the URL) but that cannot loaded via that location. As far as I know, the fact that the page is a POST and not a GET is not stored anywhere visible to the user or to JS. And refresh works oddly.

If method=QUERY were added, there would be a new variety of this weirdness.

show 1 reply
tempfiletoday at 1:20 PM

Depends whether your form submission should expect side effects or not. Most forms submissions have side effects. If the effect is truly idempotent, wouldn't PUT be a better verb? That is also supposed to be idempotent.

show 2 replies
100mstoday at 12:32 PM

Forms, HTTP implementations, public API surfaces, and all for what exactly. Introducing a new verb for this feels profoundly misplaced

show 2 replies
ctdinjeu7today at 12:41 PM

Now HN’s UX can finally be decent.

The team will have to wait for a new header and textarea specs to fix the rest of the jank.

This site is so awful lol. Why don’t they update it?

show 1 reply