I'm using the following code in my header:

meta http-equiv="Pragma" content="No-Cache"
(yes, I have greater/less than signs around it, but forums here won't let me post this for some reason with those shown).

As it stands, it still seems as though I have caching problems with IE. On my site (antisoc.net), I have the following problem: I log in, and everything behaves as it should. Login box disappears, user-specific menus appear. All is good. If I hit the home link or the title link, then everything goes to hell. Login box reappears and it acts as if I'm not logged in. If I refresh the page...then it acts as if I'm logged in again. So I believe it to be a caching problem. It's reading from cache as opposed to pulling new versions. I assumed that placing the No-Cache option above in my page header, I would've alleviated that problem. It didn't work.

This problem only happens with IE, and it doesn't always act that way. Drupal.org doesn't have this problem. Nor do many other drupal sites. Could someone PLEASE help me out. I've posted this before, but no one has been able to help me as of yet. No one has even responded. Even if you just have a thought, I can persue it further. But I've run out of ideas.

Help please.

--Coplan

Comments

andre75’s picture

Maybe your provider (or company) is using a caching Proxy.

-------------------------------------------------
http://www.aguntherphotography.com

coplan’s picture

My company at work uses a proxy. And that's where I seem to have the problems. But Drupal.org doesn't have the same problems here at work.

Our server doesn't go through a proxy.

If the proxy were the problem on the user's end...is there a way to prevent such problems? Or are those users who are behind a proxy SOL?

-- Coplan

andre75’s picture

If it is a proxy (I am not saying it is), it depends on the configuration. Proxies are being used to control traffic (what sites you are allowed to see) and to reduce the bandwidth.
At work, my browser won't work until I have the correct proxies. You might try to see, if it works with direct internet connection enabled. If it does, and still does not work, the proxy is not the problem. Otherwise there is little you can do, except maybe program a java-script that automatically reloads the page (not sure how to do this either, I am no expert)

Andre

-------------------------------------------------
http://www.aguntherphotography.com

jruberto’s picture

http://www.mnot.net/cache_docs/

I found this article to be very enlightening. Hope it helps.

You might find the section called "Pragma HTTP Headers (and why they don’t work)" interesting.

===============
Jim Ruberto
The Geek Gene, LLC
jim@geekgene.com

coplan’s picture

That's a great article, and it helped me a lot...after some experimentation. I tried to add a '' section as the document recommended, but our apache config didn't seem to like that. So I came up with some tweaks to my .htaccess file. I modified the mod_expires section as follows:

<IfModule mod_expires.c>
  ExpiresActive on
  ExpiresDefault A1
  ExpiresByType image/jpeg A604800
  ExpiresByType image/gif A604800
</IfModule>

Only problem is that now, by default, everything forces verification after 1 second. Works well for the php output...but I'd like to have images cached. So I added two exceptions: one for jpegs and one for gifs. These are the two image formats that I use on the site, and the cache on them expires after a week.

All things said and done, everything seems to be working fine now.

-- Coplan