Hi Jon,

On Wed, Feb 17, 2010 at 11:37 PM, Jon Burgess
<jburgess...@googlemail.com> wrote:
>> But if you try on the OSM server, then it works correctly: no tile is
>> sent by the server if viking already has a recent tile.
>
> Do you mean that the osmarender server works as you expect here?

Exactly - I meant that the osmarender server accepts the
If-Modified-Since header, and returns 304 if the server file is older
or the same date than the client file.


> When the client makes a request it should store the ETag returned. When
> it comes to request the tile again the client includes this ETag in a
> If-None-Match header. If the current tile on the server still has the
> same content then this will trigger a 304/NotModified response. I have
> included an example of in an attachment.
>
> We also return "Expires:" and "Cache-Control:" headers which can assist
> the client in deciding when to try requesting the tile again.
>
> All these headers are defined in the various HTTP RFCs. In theory,
> properly written web browsers and caches should work fine with them but
> I am beginning to wonder whether I should discard the ETag and move back
> to a simple last-modified time system.

Thanks for the explanation. Guilhem is right in pointing that the
client will need to store the ETag value as a metadata, which makes
ETag support not as easy to implement as last-modified.

Do you know if any software uses ETag with tile.openstreetmap.org ?


I will look tonight if it is simple to use ETag with viking and
libcurl - it should only be a matter of adding "file.etag" alongside
the image file.


Thanks,
Jocelyn

------------------------------------------------------------------------------
Download Intel&reg; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs 
proactively, and fine-tune applications for parallel performance. 
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Viking-devel mailing list
Viking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viking-devel
Viking home page: http://viking.sf.net/

Reply via email to