how to access html page by back button which was generated when request with post method was submitted

My web server is running servlet which is maintaining sessions. Based on session data different dynamically generated html pages are shown. All html pages update session data when their forms are submitted with post method.How can client access previously seen Html page with back method? I can not change post method.Can I repost the posted data automatoically, without using reload?
nishant1Asked:
Who is Participating?
 
DKostovCommented:
Try to use

window.location.reload()

with some conditional statement which will meet your requarements during the page loading. (For example you won't need this to be executed when the user accesses the page for the first time).
It will have the same effect as the "Reload" button pressed.
0
 
mafwebCommented:
Have you tried the javascript history.back() command? I'm not sure whether this works for the post method
0
 
lambdaCommented:
javascript:history.go(-1) goes one page back.

0
 
nishant1Author Commented:
My condition is if user clicks back, the html page having form with post method must be posted again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.