Answer the question
In order to leave comments, you need to log in
Which method for the search form to choose?
One point is interesting. What is the best GET or POST method to use for the search form on the site.
It is desirable if you explain all the pros and cons of both methods.
Answer the question
In order to leave comments, you need to log in
see how Google or Yandex does it - definitely GET:
- you can give a link to the search
- there will be no "send again" window when the page is updated,
well, according to the logic of the methods, nothing changes on your server, so it's better to use GET
from the minuses - you can't write requests longer than 2000 characters (limited maximum URL length in IE)
If the request changes state, then definitely POST.
Otherwise, GET.
You should also read about REST methods.
RFC 7231
It is recommended that GET and HEAD requests be used only for getting data, POST, PUT and DELETE requests for changing data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question