Pragma "no-cache" and Cache-Control "no-cache"

Pragma "no-cache" and Cache-Control "no-cache"

Post by angu.. » Sun, 11 Oct 1998 04:00:00



Hi people. Maybe someone of you can help me !!!

I'm Gabriele from Italy.

We have just installed an Apache server 1.3.1 on a Linux 2.0.33
server. Our web site contains pages that are daily updated and so we
want the user not to cache them anyway. So far, the only way to escape
this problem has been to let these pages pass through a cgi-bin
script. By this way, pages don't get cached.

Before that we tried with META tags inside the document as Expires,
but it seemed not to work correctly. Now we set the server to put
Headers in specified Directories (the ones that contains pages we want
not to be cached) - we compiled apache with mod_headers. And so we put
this on access.conf:

<Directory /usr1/www_tmp/htdocs/tlm/mostre>
AllowOverride All
#  Cache-Control  - HTTP/1.1  Header (Explorer)
#  Pragma - HTTP/1.0 Header (Netscape)
Header set Cache-Control "no-cache"
Header set Pragma "no-cache"
#ExpiresActive On
#ExpiresByType text/html "now"
Options FollowSymLinks
</Directory>

I tried this: that if we put Pragma header before Cache-Control,
Explorer (that use HTTP/1.1) ignore the last one. And Explorer does
the same if we insert any Expires header as the ones mentioned above
(we must comment them). Why? Netscape, instead, goes well.

Do you have any suggestions? Is it correct for you, or not? Should I
use  other headers or anything else?

And, how can I do not to permit proxies to cache these daily updated
pages?

Thank you everybody who'll pay attention to my message.

Ciao
Gabriele

 
 
 

Pragma "no-cache" and Cache-Control "no-cache"

Post by Liam Qui » Sun, 11 Oct 1998 04:00:00



>We have just installed an Apache server 1.3.1 on a Linux 2.0.33
>server. Our web site contains pages that are daily updated and so we
>want the user not to cache them anyway.

Actually, caching for one day from the file's modification time would
be okay, so it would be friendlier to specify the following:

ExpiresActive On
ExpiresByType text/html M86400

This specifies that HTML documents expire exactly one day (86400
seconds) after they were last updated.  (I'm assuming you've compiled
in mod_expires.)

Internet Explorer didn't start supporting the Expires header until
IE5, so don't expect to see it working in earlier versions of IE.
However, I'd recommend sticking with Expires as it's the Right Way and
is friendlier to the user than no-cache solutions.

--
Liam Quinn
Web Design Group            Enhanced Designs, Web Site Development
http://www.htmlhelp.com/    http://enhanced-designs.com/

 
 
 

1. why do Browsers send "Pragma: no-cache" ????

Hi everybody

I have the following problem :

I want to use Apache as a proxy server. This allow me to use it's Proxy
Cache feature.
But I saw that requests (gif / html or other) where never cached by
Apache.
The reason is that browsers (IE & Netscape) send a "Pragama : no-cache"
when requesting the object. And RFCs saids that this mean the proxy
must not cache anything.
I tried remove the Pragma Header and then it works as I need (caching
is ok ...).

So, my question is :

Does proxy cache NEVER works because of this header ????
Why do browsers send it ?
Am I going crazy ?

Thanks in advance

Mike

PS : I also tried with IBM HTTP Server or Web Traffic Express and had
the same result....

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Using 3com 3c509 card with linux

3. How to track "Inode", "name" and "buffer" cache rates

4. jabber (jserver) no such file?

5. GETSERVBYNAME()????????????????????"""""""""""""

6. linux-2.5.41_timer-changes_A4 (1/3 - infrastructure)

7. web caching and "Web Cache"

8. Do not underestimate the power of LaTeX

9. Is L1 cache "write back cache" in E3500 ?

10. What is "cached" in "top" and why is so big?

11. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

12. Type "(", ")" and "{", "}" in X...

13. serving dynamic documents with Apache - Pragma: no-cache, Last-Modified, etc.