GET requests in practice change stuff on the server. Making everything POSTs is just annoying - you get all those "click OK to resubmit form" messages and you don't even know what form it is.
I agree that the "click OK to resubmit form" messages are annoying - and dangerous, because your average user has no idea what the message means, or what the implications might be of clicking OK.
Fortunately, there is an extremely simple paradigm that works beautifully:
When an HTTP request is going to change something on the server,
make it a POST request.
The server receives the POST request, and updates internal state,
etc. When it is finished handling the internal changes (either
successfully or not), it does NOT print an HTML page. Instead, it
prints a REDIRECT message telling the web browser the next page it
should GET. (You're the author of the web app, so
you can build whatever ultra-specific URL you want here.)
The web browser GETs the specified page and displays it, showing
whatever HTML you deem to be appropriate as the result of the POSTed
change.
At the conclusion of this interchange, the user's browsing history
only contains the GET page that was displayed before the POST,
followed by the GET page showing the results. They can freely use
their forward and back buttons to navigate within their history with
no ill effect, and they will never see a "resubmit form?" question
from their browser.
I use this paradigm 100% of the time. You receive tremendous
benefits by respecting the documented/intended behavior of GET/POST
(e.g. no problems with caching or prefetch, and when a user
intentionally resubmits a POST operation it will truly be resubmitted
to the server), without the painful "resubmit form?" redux.
Also, don't get me wrong, I would love it more people rode bikes to work. That would free up the free ways so I could get to work in less than an hour.
And of course, in Emacs you can just type:
M-x psychoanalyze-pinhead
It will obtain random quotes from Zippy the pinhead, feed them to the ELIZA program, and display the transcript for your enjoyment!
GET requests in practice change stuff on the server. Making everything POSTs is just annoying - you get all those "click OK to resubmit form" messages and you don't even know what form it is.
I agree that the "click OK to resubmit form" messages are annoying - and dangerous, because your average user has no idea what the message means, or what the implications might be of clicking OK.
Fortunately, there is an extremely simple paradigm that works beautifully:
At the conclusion of this interchange, the user's browsing history only contains the GET page that was displayed before the POST, followed by the GET page showing the results. They can freely use their forward and back buttons to navigate within their history with no ill effect, and they will never see a "resubmit form?" question from their browser.
I use this paradigm 100% of the time. You receive tremendous benefits by respecting the documented/intended behavior of GET/POST (e.g. no problems with caching or prefetch, and when a user intentionally resubmits a POST operation it will truly be resubmitted to the server), without the painful "resubmit form?" redux.
Also, don't get me wrong, I would love it more people rode bikes to work. That would free up the free ways so I could get to work in less than an hour.
You're not alone! A recent study by the American Public Transportation Association found that 98 percent of Americans support the use of mass transit by others.