This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Could anybody help me

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am unable to sort out properly where to use get and where post in questions given at page 19 of HFSJ.So please tell me the answers with reasons.

Thanks
Sunil
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Whenever we have to send any kind of data to the server for example form submission we have to use POST method and GET method is used to request for any resource from the server.

I think you should be able to figure out answer to questions on page 19 by yourself.
 
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The GET method is Idempotent in HTTP sepecification means that multiple GET requests doesn't change the state of the server whereas POST is non-Idempotent.

In GET the data is passed in query string which is visible in the address bar of browser, so don't send data through GET which you don't want user to see, like username/password in case of login page, use POST in this case.

Similarly, there are places where you should use GET like in a search page, if you are providing a search page to user where he/she can search things depending upon some keyword or criteria, you should use GET for that so that user can bookmark the page and in future if he/she wants to use the same search criteria he/she can come to it directly whereas if you use POST in this scenerio the search criteria can not be book marked.

These are some of the cases, however now you can think more by yourself
 
Suniljava Sharma
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ali and suchen for quick response.
Just one query is here if i am going back to previous page by using Back arrow(or Alt+left arrow) then which method must be used.
 
There will be plenty of time to discuss your objections when and if you return. The cargo is this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic