I have a web page that implements the post/redirect/get pattern to avoid double posts in a simple CRUD application.
The intended request/response sequence here is:
- browser sends data via
POST
- server modifies the DB, responds with status
302 Moved Temporarily
and aLocation
header - browser follows the redirect via
GET
- server responds with the updated page
This is how it is supposed to work – and it does, in Chrome for example.
Internet Explorer 9, however, sends step 3 as a POST
, too (including the complete set of form data!). Why? What should I do to make it use GET
?
I should add that apart from the query string the redirect goes to the same location as the form target.
I've tried:
- all available of rendering modes (IE7, IE8, IE9, Quirks, Standards, Compat)
- a full DOCTYPE
- a relative URL or an absolute one in the
Location
header - HTTP Status 303 (just to see if that makes any difference)