[erlang-questions] Re: [erlang-questions 29] Re: fun with the new erlang.org!

Antoine Koener <>
Thu Mar 31 00:07:55 CEST 2011


On Mar 30, 2011, at 13:50 , Steve Vinoski wrote:

> On Wed, Mar 30, 2011 at 7:41 AM, Raimo Niskanen
> <> wrote:
>> On Sat, Mar 26, 2011 at 05:03:56PM +0100, Koener Antoine wrote:
>>> Cacheability ?
>>>
>>> I can reload the page multiples times and still download images.
>>>
>>> It seems also that images don't have any 'cache' attributes.
>>> (I don't recommended using ETags unless you're absolutely sure that
>>> ETags will be always the
>>> same on multiple web servers. i.e. some webservers use inode
>>> information to compute the ETag
>>> which is different on different servers...thought I don't know how
>>> erlang-web compute it)
>>
>> Please inform a newbie, I just checked HTML4.01 and did not
>> find any "cache" attribute.
>
> He's referring to cache control headers such as Expires, ETag, and
> Cache-Control. These aren't part of HTML but rather are typically
> configured for the web server itself. See section 13 of the HTTP 1.1
> spec:
>
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13

Exactly Steve,

Raimo,

Here's a simple method to determine how 'caching' is handled by the  
webserver:
http://www.ircache.net/cgi-bin/cacheability.py?query=http%3A%2F%2Fwww.erlang.org%2Fimages%2Fsearch_bar.jpg&descend=on

It seems that inets isn't really ideal for serving real web content,  
because [extracted from the web page]:
Last-Modified  70 weeks 5 days ago  (Fri, 20 Nov 2009 11:37:29 GMT)  
validation returned same object

If-Modified-Since are HTTP headers means:
  me (web browser talking) please web server give me only content that  
has changed since this "date", because I don't need to
retrieve the same content since I already have it...

Unfortunately inets sends the same content every time a HTTP GET is  
done, regardless of HTTP headers.

I hope that this explanation will clarify a bit more.





More information about the erlang-questions mailing list