On Mon, Dec 20, 2010 at 10:02 AM, Mingming Wang <mingofd...@gmail.com> wrote: > Thanks a lot Javier! It takes me days to understand this. > Hm...what if we don't use Redirect, what will happen in the wire? is it the > following? If so, then no re submit problem lor. I must missed something > out. > <- GET /yourapp/voteform/ > -> 200 OK (html with form) > <- POST /yourapp/vote (params) > -> 200 OK (html with results) >
The browser stores the state that a page was requested with. If at this point, the user clicks refresh in their browser, then a browser will typically resubmit the form, which is sub-optimal. By redirecting to the appropriate page, you avoid this issue. A common pattern with CRUD like queries is to redirect after any modifying action, even if it is to the same page. Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.