|
Posted by Kimmo Laine on 07/31/05 13:39
"John Dunlop" <usenet+2004@john.dunlop.name> kirjoitti
viestissδ:MPG.1d56b4dd384f3b25989705@news.ntlworld.com...
> luke wrote:
>
>> when it comes to forms, i would have put it thus: "if in doubt, use
>> post".
>
> I'm afraid I couldn't go with that either.
>
>> at the very least you gain a cleaner url.
>
> Yes, that can't be denied.
>
>> in other situations get is perfectly suited
>
> I agree, GET is suited to some situations, and you've hit the
> nail on the head: it depends on the situation.
>
> My objection was with the generalisation that you should
> always tend towards POST, no matter the situation, even if it
> is one for which you and I would both agree that GET is best.
I feel that the very essential difference is in the choice of the keywords
GET and POST. It says it all. When you want to simply GET something from the
server, perform a search for example, use get. When you are uploading data,
posting it, then use POST. And why? Because pages accessed via get, for
example a search result, is a page that can be cached and user may come back
to it if the first search result did not satisfy. If it was posted, the form
would be resubmitted and regenerated, and at least certain browsers will
warn if you are trying to resubmit a posted page. This is the method basicly
what I use as a rule, besides my one-hand-rule: if it has five fields or
less, use GET.
Also: when user is posting some data to server, one submitted via post is
more difficult to tampered, so it is also a security issue. Not fool proof
though.
--
Soulman <eternal.erectionN0@5P4Mgmail.com>
[Back to original message]
|