W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2009

[whatwg] page refresh and resubmitting POST state

From: Kornel Lesinski <kornel@geekhood.net>
Date: Sat, 23 May 2009 18:04:27 +0100
Message-ID: <op.uud61ppbptj49s@aimac.local>
On Sat, 23 May 2009 15:38:02 +0100, Mike Wilson <mikewse at hotmail.com> wrote:

>> Do you think that solution suggested by RFC 2616 13.13 is not
>> appropriate?
> It does not define what to do at page refresh, only history
> traversal, as far as I can see.

Sorry, I've assumed you were talking about Back button only.

In case of Refresh it depends whether user realizes implications of re-submitting. If browser designers don't believe that pressing Refresh button states intent clearly enough, then I think asking the question might be justified.

As creator of application you can solve this dylemma:

* If it's not safe to resubmit, use status 303. I know it's not very convenient, but can be implemented reasonably well and works with existing browsers.
* If it's safe to resubmit, use PUT method (allowed in HTML 5), which is idempotent by definition.

regards, Kornel Lesinski
Received on Saturday, 23 May 2009 10:04:27 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:12 UTC