W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2005

[whatwg] A thought: <a href="..." method="post">

From: Sjoerd Visscher <sjoerd@w3future.com>
Date: Mon, 09 May 2005 14:23:30 +0200
Message-ID: <427F5642.60507@w3future.com>
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
Received on Monday, 9 May 2005 05:23:30 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:41 UTC