Re: Last-Event-ID in http://dev.w3.org/html5/eventsource/

On Mar 2, 2010, at 2:59 AM, Julian Reschke wrote:

> Hi,
>
> it appears to me that this header replicates something that is  
> already there; just use the last event ID as etag, and then you can  
> do something like:
>
> GET /foobar HTTP/1.1
> If-None-Match: "abc"
>
> Note that this makes If-None-Match a request header on which the  
> response varies, thus it should carry:
>
> Vary: If-None-Match
>
> ...but this is the case for Last-Event-ID as well.

Using If-None-Match this way seems like a bad fit in a couple of ways:

- Event IDs are not ETags at the HTTP level. It seems like a layering  
violation to treat event IDs, or indeed anything in the response body  
rather than in the ETag header, as entity tags.
- If-None-Match does a conditional GET. But a 304 response to an  
EventSource request would not make sense under any circumstances. The  
server should wait until it has more events to send, not tell the  
client to consult a cached copy. The client likely won't even have a  
cached copy.

Regards,
Maciej

Received on Tuesday, 2 March 2010 11:54:14 UTC