hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Apache sending Pragma: no-cache directive
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Apache sending Pragma: no-cache directive

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-20-2003, 01:00 AM
bloom bloom is offline
WHT Addict
 
Join Date: Nov 2002
Posts: 108

Apache sending Pragma: no-cache directive


Hi,

I've just set up a LAMP box (Linux, Apache, mySQL, PHP, etc.) and I'm having a problem with Apache sending no-cache headers.

I checked my PHP code and I'm not sending out *any* headers or meta-tags to control caching. On my old server with a similar setup I didn't have the problem.

I used Mozilla's "Live Headers" extension to capture the headers:
Quote:
HTTP/1.x 200 OK
Date: Wed, 20 Aug 2003 04:40:08 GMT
Server: Apache/1.3.28 (Unix) PHP/4.3.2 mod_gzip/1.3.26.1a mod_auth_passthrough/1.6 mod_log_bytes/1.2 mod_bwlimited/1.0 FrontPage/5.0.2.2634 mod_ssl/2.8.15 OpenSSL/0.9.7a PHP-CGI/0.1b
Vary: Accept-Encoding
X-Powered-By: PHP/4.3.2
Set-Cookie: PHPSESSID=[some id]; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
Content-Encoding: gzip
What's up with the Cache-Control headers telling the browser not to store or cache the pages? And that 1981 expiration date will pretty much mean that *everything* refreshes from the server every time, which defeats the purpose of using mod_gzip to begin with.

I've tried looking through my httpd.conf file for anything having to do with Caching and there's nothing there. Is this something that's controlled by PHP, or is there some conflict with one of the Apache modules, like mod_gzip or something else?

It's driving me crazy.

__________________
poetry archives


Last edited by bloom; 08-21-2003 at 02:46 AM.
Reply With Quote


Sponsored Links
  #2  
Old 08-20-2003, 05:12 AM
qm8309 qm8309 is offline
Web Hosting Master
 
Join Date: Feb 2003
Posts: 1,136
did u do a test to see if it actually caches or not by clearing ur IE cache and open up a page from the server?

as of the nocache header its sent by a setting in the php.ini session section
session.cache_limiter = nocache

this is the default php setting and it only tells the browser not to cache the php dynamic pages. it should not affect any static pages on the server.

just make sure ur mod_gzip parameters are set correctly in httpd.conf and there shouldnt be any problem.

Reply With Quote
  #3  
Old 08-20-2003, 05:14 AM
qm8309 qm8309 is offline
Web Hosting Master
 
Join Date: Feb 2003
Posts: 1,136
i think this thread is broken.

Reply With Quote
Sponsored Links
  #4  
Old 08-21-2003, 02:49 AM
bloom bloom is offline
WHT Addict
 
Join Date: Nov 2002
Posts: 108
I think the problem *was* in teh session cache limiter, but it seems to have the adverse effect of the browser not caching *any* part of the page, not just the php page itself.

So images, css files, other includes (javascript, etc.) were not being cached.

I *think* it's fixed now, although I still get an impage "blip" where the images will disappear for a second and then reappear just before the page finishes loading, which didn't happen on my previous server.

Here's a page where it's pretty noticeable (work safe, ad free):

http://poetryx.com

__________________
poetry archives

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
NGINX 1.2.0 Update of Web Server Improves HTTP Proxy Support Web Hosting News 2012-04-24 16:47:23
Certified Hosting Deploys Varnish HTTP Caching for Faster Hosting Services Web Hosting News 2012-02-28 14:10:30
Apache Web Server Adds Cloud Capabilities with First Major Update in 5 Years Web Hosting News 2012-02-21 16:05:02
Oracle is the Latest Vendor to Apply Patch for Apache Killer Flaw Web Hosting News 2011-09-19 14:43:58
Patch Released for Apache Software DDoS Vulnerability Web Hosting News 2011-08-26 15:03:10


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?