[ List Archives Home ] [ Thread index for 2008 ]
[ Date index for 2008 ]
[ Author index for 2008 ]
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
> I noticed that search boxes on our site have both "get" and "post". What is the different, which one is recommended and are they interchangeable?
>
> I did look this up, but I want a simple answer that I can understand. :>
Usually, they are interchangeable. As Ed mentions, GET appends the
form data to the URL string. In plain English, this means you can save
the search as a link. This allows you to bookmark the search, send it
around via email, or put it in a page. GET queries can usually be sent
from anywhere.
POST does allow more data. However, for a library search box, GET is
plenty for a simple search box. For your purposes, the best reason to
use POST is that you don't want people to be able to save searches as
links. You might do this because you want to force people to use your
form to conduct a search (most servers are configured not to allow
POST queries from forms housed on other servers) or that you don't
want anyone to create links that could be crawled by a web spider.
kyle