Subject:
|
Re: Forced refresh of html pages instead of getting them from browser cache
|
Newsgroups:
|
lugnet.publish, lugnet.off-topic.geek
|
Date:
|
Wed, 9 Aug 2000 20:30:17 GMT
|
Viewed:
|
593 times
|
| |
![Post a public reply to this message](/news/icon-reply.gif) | |
In lugnet.publish, Matthew Miller writes:
> Todd Lehman <lehman@javanet.com> wrote:
> > IIRC, there is a pragma no-cache that you can add to the HTTP headers.
>
> Some browsers (I don't remember which ones, sorry) don't respect this. It's
> best to combine this with the expires header, I think. :(
Here's what I do to guarantee no caching:
void printCGIheader(){
printf("Content-type: text/html\n");
printf("Expires: 0\n");
printf("Cache-control: no-cache\n");
printf("Pragma: no-cache\n");
printf("\n");
}
void printCookieHeader(char *token) {
printf("Content-type: text/html\n");
printf("Expires: 0\n");
printf("Cache-control: no-cache\n");
printf("Pragma: no-cache\n");
printf("Set-cookie: token=%s\n",token);
printf("\n");
}
I basically threw in everything and the kitchen sink.
This should work for both HTTP 1.0 and 1.1 and those pesky proxy caches.
(although @home's proxy server kills the cookies for some reason, but
there is no need to use @home's proxy servers). Squid proxy server
passes the cookies just fine and does not cache anything.
KL
|
|
Message has 1 Reply:
Message is in Reply To:
18 Messages in This Thread: ![Forced refresh of html pages instead of getting them from browser cache -Larry Pieniazek (9-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif) ![](/news/246.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Todd Lehman (9-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif) ![](/news/46.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Matthew Miller (9-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif) ![](/news/46.gif) ![You are here](/news/here.gif) ![](/news/46.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Todd Lehman (9-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif) ![](/news/46.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Kevin Loch (9-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif)
![](/news/x.gif) ![](/news/268.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Geoff Gray (9-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif) ![](/news/46.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Kevin Loch (9-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif)
![](/news/x.gif) ![](/news/68.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Ed Jones (9-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif) ![](/news/246.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Larry Pieniazek (9-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif) ![](/news/246.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Kevin Loch (9-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif) ![](/news/46.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Kevin Loch (9-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Ed Jones (14-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif) ![](/news/246.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Shiri Dori (14-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Larry Pieniazek (15-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Matthew Miller (10-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif) ![](/news/46.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Ed Jones (14-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif) ![](/news/46.gif) ![Re: Forced refresh of html pages instead of getting them from browser cache -Matthew Miller (14-Aug-00 to lugnet.publish, lugnet.off-topic.geek)](/news/x.gif)
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|