After user submits I redirect back to the same page with the users submitted data in the form. I can see the data POST and then immediately followed by a GET of the same page in Firefox 36.0.4 desktop, Chrome 41.0.2272 desktop, Opera 10.0 iPhone 5, Chrome 41.0.2272 iPhone 5. However, only the Chrome on mobile causes a "Confirm Resubmit" on refresh and also doesn't load all the js again. Is there a fix for this problem?
Here is my minimal simple view.
def workout(request):
form = WorkoutInfoForm(request.POST or None)
if form.is_valid():
form.save()
post = request.POST.copy()
request.session['_old_post'] = post
return redirect(reverse("workout.views.workout"))
if not request.POST:
old_post = request.session.get('_old_post')
form = WorkoutInfoForm(old_post or None)
return render_to_response("workout/track_workout.html",
locals(),
context_instance=RequestContext(request))
And my form start in my template
<form method='POST' action='' class="form-horizontal" role="form"> {% csrf_token %}