[whatwg] A thought: <a href="..." method="post">
Sjoerd Visscher
sjoerd at w3future.com
Mon May 9 05:23:30 PDT 2005
James Graham wrote:
> I should have stated explicitly that when I said "marking the message as
> read in some way" I intended that the "some way" could be more than just
> changing a message's unread flag, it could be e.g. moving the message
> from the inbox to a "Read messages" folder. Even if the message is
> "just" marked as read, this can change more than the appearance of the
> message - it can change where in the interface it is displayed (in some
> sort of virtual-folder based setup), etc. So I don't think you can
> dismiss this as "not really a good example of a non-idempotent action" -
> it clearly /is/ non-idempotent yet representing the action as a link is
> normal and widely understood.
>
What this shows is that marking a message read when it is retrieved is a
bad idea. Retrieving a message must be done with GET, so that it can be
cached. Setting the read state should be done seperately with POST.
Most e-mail clients only mark an item read when it's open for a few
seconds, it's a bonus that you can do that too.
--
Sjoerd Visscher
http://w3future.com/weblog/
More information about the whatwg
mailing list