In my app
user can access to the community page just like this
http://example.com/communities?tag=lovely
then if I try to go back to the previous page. I always get this message
Are you sure you want to send a form again
This only appears when it’s accessed from Safari
How can I avoid that. I don’t want user to see it every time when they go back.
routes.rb
resources :communities
One way to avoid this problem is to make your POST responses return a redirect (HTTP 301 or 303) to a new page, which the browser then requests with GET. Going back should (though doesn’t always) fetch the original form page, not the POST.
In Rails, this run-around often looks like this:
/foos/new<FORM method='POST' action='/foos'>/foos(with params)/foos/123/foos/123