Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

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?
0
nishant1
Asked:
nishant1
1 Solution
 
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
 
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now