Arc Forumnew | comments | leaders | submitlogin
6 points by emmett 6135 days ago | link | parent

I think you're spot on. I just wanted to share a little trick, with regards to:

  Second, improving back button behavior is a matter of 
  setting all the right nocache attributes. If you use forms, 
  you're likely to have trouble with back navigation no matter 
  what you do ("The page contains expired POST data").
The key is to use a 302 redirect immediately after a successful post rather than a 200. This makes using the back button take you back to the form, rather than trying to POST it again.

On the other hand, I find the ability to resubmit forms with the back button very useful at times, so I'm not sure this is always the right thing to do. But it's a neat trick.



1 point by JoshKingBoston 6135 days ago | link

Post/Redirect/Get (http://en.wikipedia.org/wiki/Post/Redirect/Get) is the relevant design pattern to handle this situation.

-----