Question: GET vs POST method

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • VB Programmer

    #1

    Question: GET vs POST method

    Can someone provide a simple explanation on the difference between the GET
    and POST methods? What are the adv/disadv of both and when should I use
    them?

    Thanks.


  • Ravikanth[MVP]

    #2
    Question: GET vs POST method

    Hi

    Get and Post are methods used to send data to the server:
    With the Get method, the browser appends the data onto
    the URL. With the Post method, the data is sent
    as "standard input."


    It's important for you to know which method you are
    using. The Get method is the default, so if you do not
    specify a method, the Get method will be used
    automatically.

    The Get method has several disadvantages:
    There is a limit on the number of characters which can be
    sent to the server, generally around 100 - 150
    characters.
    Your user will see the "messy codes" when the data is
    sent.

    The Bottom Line is With the Get method, your users will
    see the "messy codes" in the Location box when they
    submit a form. With the Post method, they won't


    Hope this gives an idea

    Ravikanth[MVP]

    [color=blue]
    >-----Original Message-----
    >Can someone provide a simple explanation on the[/color]
    difference between the GET[color=blue]
    >and POST methods? What are the adv/disadv of both and[/color]
    when should I use[color=blue]
    >them?
    >
    >Thanks.
    >
    >
    >.
    >[/color]

    Comment

    • Jos

      #3
      Re: Question: GET vs POST method

      VB Programmer wrote:[color=blue]
      > Can someone provide a simple explanation on the difference between
      > the GET and POST methods? What are the adv/disadv of both and when
      > should I use them?
      >
      > Thanks.[/color]

      In addition to Ravikanth's posting:

      Use GET:
      - during development for debugging purposes (although in ASP.NET it's
      also easy to see what has been sent through POST.
      - if you want your visitors to be able to bookmark the submitted pages
      - if you want to refer to submitted pages using hyperlinks

      Use POST:
      - for forms with password fields
      - for large forms or forms with large text fields

      Please note that web forms in ASP.NET use POST by default. It can be
      changed into GET, but only for small forms. Web forms can post a lot
      of data, especially when ViewState is involved.

      --

      Jos Branders


      Comment

      • VB Programmer

        #4
        Re: Question: GET vs POST method

        GREAT response! Thanks.

        "Jos" <josnospambrand ers@fastmail.fm > wrote in message
        news:urxhA7LXDH A.1680@tk2msftn gp13.phx.gbl...[color=blue]
        > VB Programmer wrote:[color=green]
        > > Can someone provide a simple explanation on the difference between
        > > the GET and POST methods? What are the adv/disadv of both and when
        > > should I use them?
        > >
        > > Thanks.[/color]
        >
        > In addition to Ravikanth's posting:
        >
        > Use GET:
        > - during development for debugging purposes (although in ASP.NET it's
        > also easy to see what has been sent through POST.
        > - if you want your visitors to be able to bookmark the submitted pages
        > - if you want to refer to submitted pages using hyperlinks
        >
        > Use POST:
        > - for forms with password fields
        > - for large forms or forms with large text fields
        >
        > Please note that web forms in ASP.NET use POST by default. It can be
        > changed into GET, but only for small forms. Web forms can post a lot
        > of data, especially when ViewState is involved.
        >
        > --
        >
        > Jos Branders
        >
        >[/color]


        Comment

        • Jerry III

          #5
          Re: Question: GET vs POST method

          You should also use POST for all requests that result in changes on the
          server (such as updating the database). Clients will automatically resubmit
          GET forms but not POST forms if the user refreshes the page (or goes back to
          it in their history).

          Jerry

          "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
          news:%23VLQdgNX DHA.212@TK2MSFT NGP12.phx.gbl.. .[color=blue]
          > GREAT response! Thanks.
          >
          > "Jos" <josnospambrand ers@fastmail.fm > wrote in message
          > news:urxhA7LXDH A.1680@tk2msftn gp13.phx.gbl...[color=green]
          > > VB Programmer wrote:[color=darkred]
          > > > Can someone provide a simple explanation on the difference between
          > > > the GET and POST methods? What are the adv/disadv of both and when
          > > > should I use them?
          > > >
          > > > Thanks.[/color]
          > >
          > > In addition to Ravikanth's posting:
          > >
          > > Use GET:
          > > - during development for debugging purposes (although in ASP.NET it's
          > > also easy to see what has been sent through POST.
          > > - if you want your visitors to be able to bookmark the submitted pages
          > > - if you want to refer to submitted pages using hyperlinks
          > >
          > > Use POST:
          > > - for forms with password fields
          > > - for large forms or forms with large text fields
          > >
          > > Please note that web forms in ASP.NET use POST by default. It can be
          > > changed into GET, but only for small forms. Web forms can post a lot
          > > of data, especially when ViewState is involved.
          > >
          > > --
          > >
          > > Jos Branders
          > >
          > >[/color]
          >
          >[/color]


          Comment

          Working...