• Post Reply Bookmark Topic Watch Topic
  • New Topic

get vs post  RSS feed

 
pravin badiyavadra
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is difference between get method and post method of an HTML form
 
panyam meruva
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Praveen..
Get is for sending limited amount of data and it is not secure as the data sent is appended to the URL of the browser..Where the post is for large anount of data and data sent is appended to the body of the HTTP post method..
 
pravin badiyavadra
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank u pranyam

but how can i append data to URL and is there any limit of size of data for get method?
 
satishkumar janakiraman
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The maximum amount of data transferred in get method is browser dependent. But mostly 255 characters or 4k in IE.
Append data like this

differences
  • data is part of the URL in get method. But in Post method data is sent as request message body.
  • Data is cached in the browsers URL history if you use get method, but in post method Data cannot be cached.
  • In get method you can send only text but in post method you can send text as well as binary


  • I hope, it will help you

    bye for now
    sat




     
    pravin badiyavadra
    Greenhorn
    Posts: 13
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    thank u satishkumar

    now it is more clear

    can u tell me why is there a need of this risky method while JSP provides sessions.
     
    Nathan Pruett
    Bartender
    Posts: 4121
    IntelliJ IDE Java Spring
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Because sessions are only on the server - GET and POST are ways for the server to get the data needed from the client. (Which can then be stored in the session, etc. if you want.)
     
    samir ware
    Ranch Hand
    Posts: 192
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi PRAVIN,
    simply stated , GET is for getting the data from the server side , lke the HTML page or some other stuff like image, .jar file etc.
    and also it tis not very secured because whenever we make the use of this GET methode, the data that we request is sending is displayed on the URL address bar.
    In addaTION TO THIS , DATA tat can be send in the GET is limited .


    On other side, Its not the case withthwe \post

    Data sending is secured
    Larger data can be send in the \post methode as compaired to the GET
    Andis typically used for sending that data on the server side that we typically WANT TO DUMP THERE. |Like some form data...name,address etc.
    |I hope this will clear the difference between the 2
    bye
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Posts: 66158
    146
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by samir ware:
    Data sending is secured


    Not true. POST data is sent in clear text just like a GET unless SSL is being used.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!