Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

HTTP headers and cashes

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  IIS 5  
Author Message
anichin

External


Since: Nov 05, 2003
Posts: 4



(Msg. 1) Posted: Wed Nov 05, 2003 4:04 am
Post subject: HTTP headers and cashes
Archived from groups: microsoft>public>inetserver>iis (more info?)

Hello,

Can information be gathered from response HTTP headers
if the content of the page was cashed ?


Thanks,

Angel

 >> Stay informed about: HTTP headers and cashes 
Back to top
Login to vote
kenremove

External


Since: Aug 23, 2003
Posts: 3041



(Msg. 2) Posted: Wed Nov 05, 2003 2:27 pm
Post subject: Re: HTTP headers and cashes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

a) Gathered where? and by what?
b) Cached where? and by what?

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
:

 >> Stay informed about: HTTP headers and cashes 
Back to top
Login to vote
anichin

External


Since: Nov 05, 2003
Posts: 4



(Msg. 3) Posted: Wed Nov 05, 2003 2:27 pm
Post subject: Re: HTTP headers and cashes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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:
<a style='text-decoration: underline;' href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.6" target="_blank">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.6</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
 > :
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: HTTP headers and cashes 
Back to top
Login to vote
kenremove

External


Since: Aug 23, 2003
Posts: 3041



(Msg. 4) Posted: Wed Nov 05, 2003 9:11 pm
Post subject: Re: HTTP headers and cashes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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:
: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.6
:
: 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
: > :
: >
: >
:
 >> Stay informed about: HTTP headers and cashes 
Back to top
Login to vote
anichin

External


Since: Nov 05, 2003
Posts: 4



(Msg. 5) Posted: Wed Nov 05, 2003 9:11 pm
Post subject: Re: HTTP headers and cashes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.RemoveThis@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.RemoveThis@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 
Back to top
Login to vote
someone9

External


Since: Aug 25, 2003
Posts: 2419



(Msg. 6) Posted: Wed Nov 05, 2003 9:11 pm
Post subject: Re: HTTP headers and cashes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 
Back to top
Login to vote
anichin

External


Since: Nov 05, 2003
Posts: 4



(Msg. 7) Posted: Fri Nov 07, 2003 2:10 am
Post subject: Re: HTTP headers and cashes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

David Wang [Msft] wrote:

 > 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?
 >
Well, now I suspect the problem is with Commerce Direct Mailer.
I have postet to microsoft.public.commerceserver.general
<a style='text-decoration: underline;' href="news://news.microsoft.com/ebWXecKpDHA.2528@TK2MSFTNGP10.phx.gbl" target="_blank">news://news.microsoft.com/ebWXecKpDHA.2528@TK2MSFTNGP10.phx.gbl</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: HTTP headers and cashes 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]