[whatwg] page refresh and resubmitting POST state

Mike Wilson mikewse at hotmail.com
Mon May 25 03:14:48 PDT 2009


Kristof Zelechovski wrote:
> If the local document is being edited in Notepad and bound to 
> the validator via a file input control, refreshing the page 
> should resubmit the file.
> Chris

Ah, ok. I see no problem with the page author coupling the file
input control to the redisplay state, or whatever construct 
could be used to hint to the browser that this data can be
resubmitted without "harm". You would then avoid getting the 
resubmission question on refresh.

The hinting system could be useful whether we say that the
Refresh button's semantics is Redisplay or Redo. Both would 
avoid popping the resubmission question when all fields are 
hinted harmless, but they would have different behaviour for 
when there is a mix of "harmless" and "harmful" fields.

Of course, the same goal could be achieved with a completely 
different solution. This was just an example to get going.

On a side note, your example makes me think of whether what to 
post at a page refresh is covered by any spec. The normal 
behaviour is that the browser posts the same data as sent in
the original POST request, so if you have done any edits in the
form between original POST and Refresh, they will be lost (this
could even be subject for a "discard edits?" question ;-).
Though as you mention, and I guess for practical reasons, the
file contents of an uploaded file doesn't reflect the original
request but instead the current file contents. Nothing wrong
with that, but maybe this also deserves spec space.

So, going back to my main point. All this is about de-facto, or
potential future, browser behaviour and thus would be 
interesting in a spec about just that. The HTML5 effort is the 
closest match I've found for this subject.

Best regards
Mike Wilson




More information about the whatwg mailing list