This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

method  RSS feed

 
kan nat
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

whic method is called when user clicks back button in browser, is it get or post.
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think the method which called by back button is "GET" method..

Thank's
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The previous page would be returned from the browser cache, unless the browser had already been told not to cache that page. If the page was not cached then the page is requested by the browser again, whether it was by GET or POST. If POST was used to load the page initially, the browser will typically warn the user that the data will need to be resent in case this could result in something like an order being placed a second time.

This warning can be avoided using the POST-redirect-GET best practice. When doing this, whenever a form sends data using POST, the processing Servlet calls sendRedirect once it is done, so that the browser sends a GET request for the next page. Reloading the page and pressing the button do not result in the POST being repeated.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66143
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

A title such as "method" is not helpful. What would happen if all posts had such a title?

Please go back and change your post to add a more meaningful subject by clicking the button on your post.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!