You cannot prevent the resubmit because you cannot control what the user does with his browser. What you need to do is guard against a resubmit actually doing something a second time. You could add some sort of generated number to the form and mark on the server side that this number has already been processed. Then you can check for this when the form is being submitted and you can refuse to do the form action when the number is already marked.