Hi all,

I've noticed a unexpected behavior in webkit, both in the browser and
webviews in apps in Android 4.0. I have a ordinary html page with a form
using method=post:

 <form action="post.jsp" method="post">
  <div>
   <input type="text" name="name" />
   <input type="submit" />
  </div>
 </form>

When I submit the form, on a Galaxy One with ICS, and then use the browser's
back button to go back to the form again, the data is silently submitted a
second time without any prior warning. This behavior is also what I see
using a SDK emulator device with Android 4.0.3.

When I press the same back button after the form post on a Galaxy Nexus
(4.0.1) I first get a error dialog: "Connection problem" and "A network
error occurred." and behind that I see the browsers default error page
"Webpage not available", and if I select the url on that error page it loads
but obviously without any form submit parameters.

It makes no difference if I test on wifi or a 3G network.

Expected behaviour is what happens on Android 2.x; When I try to use the
browser back button to go back to the form I get a confirm dialog asking me
if I really want to resubmit POSTDATA before I continue.

This - IMHO correct - behavior is also what I see in the emulator for
android 3.1.

Is this a known issue? I've been unable to get any relevant results on my
search for anyone describing this issue. Anyone knows if it is something
Google plans to fix, or if is a intended change of behavior?

I am well aware of the post-redirect-get pattern, and obviously using that
approach will make it impossible to recreate the above issue. That's not my
question.

PS. This was initially posted to android-discuss by mistake.

--
Fredrik Jonson

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to