Looking up the HTTP spec is a good start. You're asking about HTTP Content
Caching, and the HTTP Spec devotes a huge chunk to that topic alone. This
doesn't even explore Client-side and Server-side caches that are not
constrained to this spec.
Do you think your problem is content being cached, or stale cookies?
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Angel Anichin" <anichin DeleteThis @vip.bg> wrote in message
news:uJTYHS5oDHA.1488@TK2MSFTNGP12.phx.gbl...
Ken Schaefer wrote:
> It depends on the proxy. Most transparent proxies will not tell you that
you
> are receiving cached content. However, most modern proxies will check with
> the original server to see if the content has been changed before sending
> you a cached version.
>
> I don't think there's anyway you can tell if something has been served
from
> a cache if the cache doesn't tell you.
>
> Cheers
> Ken
>
>
> "Angel Anichin" <anichin DeleteThis @vip.bg> wrote in message
> news:Oyku4L2oDHA.3732@tk2msftngp13.phx.gbl...
> : Ken Schaefer wrote:
> : > a) Gathered where? and by what?
> :
> : At the client side by some headers sniffer program.
> : I use LiveHTTPHeaders (http://livehttpheaders.mozdev.org/)
> : with Mozilla Firebird.
> :
> : > b) Cached where? and by what?
> :
> : Cached at the IIS or at some caching proxy.
> :
> : I wonder if there is some specific header that presents
> : only if the content comes from the cache. I think such header is Age
> : header but I am not sure. Look here:
<font color=purple> > : <a style='text-decoration: underline;' href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.6</font" target="_blank">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.6</font</a>>
> :
> : I need some way to make difference if the content I receive
> : is fresh generated of it comes from the cache. Any ideas ?
> :
> : >
> : > Response headers are sent by the server as part of the response to a
> HTTP
> : > request...
> : >
> : > Cheers
> : > Ken
> : >
> : > "Angel Anichin" <anichin DeleteThis @vip.bg> wrote in message
> : > news:ecqEnfyoDHA.3732@tk2msftngp13.phx.gbl...
> : > : Hello,
> : > :
> : > : Can information be gathered from response HTTP headers
> : > : if the content of the page was cashed ?
> : > :
> : > :
> : > : Thanks,
> : > :
> : > : Angel
> : > :
> : >
> : >
> :
>
>
Thanks for your answer. I found some information here:
<a style='text-decoration: underline;' href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.45" target="_blank">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.45</a>
The Via general-header field MUST be used by gateways and proxies to
indicate the intermediate protocols and recipients between the user
agent and the server on requests, and between the origin server and the
client on responses...
I found interesting article how telnet can be use to read the html headers:
<a style='text-decoration: underline;' href="http://hotwired.lycos.com/webmonkey/99/36/index3a_page3.html?tw=backend" target="_blank">http://hotwired.lycos.com/webmonkey/99/36/index3a_page3.html?tw=backend</a>
It was not mentioned however how a cookie can be set before requesting
the headers. The web page in question is personalized and the content
depends on setting a cookie.
From time to time the page responds with a wrong content although the
cookie is set corectly. The code was checked by two other developers and
there is no error in it.
The only possible cause for the problem is that page is cached somewhere.
At the top of the page I use:
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
in order to prevent caching of the page.
Obviously it is not enough. Recently I found some other *magic* trick I
haven't use:
Response.ExpiresAbsolute = #1/1/1980#
Response.AddHeader "cache-control", "private, no-cache, must-revalidate"
Response.CacheControl = "no-cache"
I am going to try these but still I am interested what and where caches
the page and how I can understand this. Please, help if you know the answer.<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: HTTP headers and cashes