This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

In the chapter 1 in HFJS

 
Rohan Kayan
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a question in the chapter 1 that is about where to use Get and where to use Post ?
For me to answer this question only two points are there
1. If there is any fild like Password you want to send , then u can't use Get.
2. When the data is in bulk mean more then the limit of Get , then you can't use the Get method .

Is there any other criteria for selection between Get method and Post method???



Rohan
 
Sergey Tyulkin
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your form will update something on the server (for example, inserting or updating record in a database), then use POST. If you then try to refresh the page (send the same request once again), you will get "Are you sure to send request with POST data?" warning in most browsers.
If your form will not do any update (for example, a form for "Search by") then use GET. Such pages can be easily refreshed without warnings.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!