Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #2648 > unrolled thread
| Started by | j <mung_me@att.net> |
|---|---|
| First post | 2011-07-26 11:35 -0400 |
| Last post | 2011-07-28 15:19 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to comp.lang.php
Avoiding Proxy Caching j <mung_me@att.net> - 2011-07-26 11:35 -0400
Re: Avoiding Proxy Caching Michael Fesser <netizen@gmx.de> - 2011-07-26 19:58 +0200
Re: Avoiding Proxy Caching j <mung_me@att.net> - 2011-07-26 15:02 -0400
Re: Avoiding Proxy Caching "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-07-27 08:40 +0200
Re: Avoiding Proxy Caching Michael Fesser <netizen@gmx.de> - 2011-07-28 15:19 +0200
| From | j <mung_me@att.net> |
|---|---|
| Date | 2011-07-26 11:35 -0400 |
| Subject | Avoiding Proxy Caching |
| Message-ID | <j0mmsc$gp8$1@news.albasani.net> |
I'm having trouble with a proxy server caching pages. Is there a header or something that I can send to alleviate this problem? What I have is an htaccess rewrite rule RewriteRule ^(.*/protected_directory/.*) /pass_check_script.php?path=/$1 that sends all requests for a directory to a php script that does some password checking and then reads the file and prints a Content-type and then prints the file contents. A proxy server has cached the results and avoids the pass check. I was thinking of sending something in the header, or perhaps just amending some random string to the html. I know proxy servers ignore html type no-cache settings. Jeff
[toc] | [next] | [standalone]
| From | Michael Fesser <netizen@gmx.de> |
|---|---|
| Date | 2011-07-26 19:58 +0200 |
| Message-ID | <lvvt27llohmdii3lb1ig3otkjatmdp6jfg@mfesser.de> |
| In reply to | #2648 |
.oO(j) > I'm having trouble with a proxy server caching pages. Is there a >header or something that I can send to alleviate this problem? Caching Tutorial for Web Authors and Webmasters http://www.mnot.net/cache_docs/ Micha -- http://mfesser.de/blickwinkel
[toc] | [prev] | [next] | [standalone]
| From | j <mung_me@att.net> |
|---|---|
| Date | 2011-07-26 15:02 -0400 |
| Message-ID | <j0n2vg$ebr$1@news.albasani.net> |
| In reply to | #2649 |
On 7/26/2011 1:58 PM, Michael Fesser wrote:
> .oO(j)
>
>> I'm having trouble with a proxy server caching pages. Is there a
>> header or something that I can send to alleviate this problem?
>
> Caching Tutorial for Web Authors and Webmasters
> http://www.mnot.net/cache_docs/
>
> Micha
>
Thanks! Looks like: header('Cache-Control: no-store');
Jeff
[toc] | [prev] | [next] | [standalone]
| From | "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> |
|---|---|
| Date | 2011-07-27 08:40 +0200 |
| Message-ID | <j0obt1$8mi$1@dont-email.me> |
| In reply to | #2648 |
El 26/07/2011 17:35, j escribió/wrote:
> I'm having trouble with a proxy server caching pages. Is there a header
> or something that I can send to alleviate this problem?
>
> What I have is an htaccess rewrite rule
>
> RewriteRule ^(.*/protected_directory/.*) /pass_check_script.php?path=/$1
>
> that sends all requests for a directory to a php script that does some
> password checking and then reads the file and prints a Content-type and
> then prints the file contents. A proxy server has cached the results and
> avoids the pass check.
>
> I was thinking of sending something in the header, or perhaps just
> amending some random string to the html. I know proxy servers ignore
> html type no-cache settings.
I normally use something like this:
header('Expires: ' . gmdate('D, d M Y H:i:s', time()-86400*365*10) . '
GMT');
header('Cache-Control: no-store, no-cache, must-revalidate,
post-check=0, pre-check=0');
header('Pragma: no-cache');
If I recall correctly it's the "Pragma" header the one that's designed
for proxies but I'd say there's no need to cache the password checking
page not even in browsers.
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
[toc] | [prev] | [next] | [standalone]
| From | Michael Fesser <netizen@gmx.de> |
|---|---|
| Date | 2011-07-28 15:19 +0200 |
| Message-ID | <m6o237d1fslucc4101h7et1m8d9teta84v@mfesser.de> |
| In reply to | #2655 |
.oO(Álvaro G. Vicario)
>I normally use something like this:
>
>header('Expires: ' . gmdate('D, d M Y H:i:s', time()-86400*365*10) . '
>GMT');
>header('Cache-Control: no-store, no-cache, must-revalidate,
>post-check=0, pre-check=0');
>header('Pragma: no-cache');
>
>If I recall correctly it's the "Pragma" header the one that's designed
>for proxies but I'd say there's no need to cache the password checking
>page not even in browsers.
The 'Pragma' header was defined as a request header. It were broken
browsers like old IE that turned it into a response header, but such a
meaning is not specified.
Micha
--
http://mfesser.de/blickwinkel
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web