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

[whatwg] page refresh and resubmitting POST state

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 10 Jul 2009 00:52:20 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0907100051470.23663@hixie.dreamhostps.com>
On Thu, 11 Jun 2009, Jeremy Orlow wrote:
> > On Sat, 23 May 2009, Mike Wilson wrote:
> > >
> > > I was thinking about the resubmit problem in a general context, 
> > > specifically how browsers could make it possible for web authors to 
> > > create POSTing pages that avoids giving the dreaded "do you want to 
> > > resubmit" question at all, independent of operation.
> >
> > Just do a redirect like Jonas describes, instead of returning the page 
> > contents directly. You can even redirect to the same URL.
> 
> This would cause additional network round-trips which is suboptimal.

One alternative is to detect the case where JS is enable, and if it is, 
use pushState() and XHR to do the POST in the background and avoid the 
page load altogether.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 9 July 2009 17:52:20 UTC

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