I've set up a new drupal site on Drupal 4.6.3.

My problem is very similar to "Prevent browser page caching of dynamic content" issue:

1. I point browser to home page (kneiphof.ru)
2. I log in
3. I point browser to home page again
4. Site shows me incorrect page (like I haven't logged in)
5. I press Refresh in browser (F5 in Firefox or Ctrl-F5 in IE)
6. Site shows me correct page (I've logged)

This happens to every page, for example admin/settings or admin/logs.

I've carefully read Drupal's issue Prevent browser page caching of dynamic content. It propose 2 ways of solving this problem:

1. Patching .htaccess
2. Patching includes/bootstrap.inc

First way is already implemented in 4.6.3 AFAIK.

Second didn't solve my problem - pages are incorrect anyway. Also patch programm (control-browser-caching_1.patch) says "Reversed (or previously applied) patch detected!" - what is this?

Does anybody have same problems? How can this be solved?

Thanks in advance!

Comments

jetsetter’s picture

Hey there,

I'm having the same problem, though my issues are specific to phptemplate. I haven't taken any special steps regarding caching but this is what I'm experiencing:

I'll make edits to box.tpl.php, and even phptemplate.engine and I'll see mixed updating. For instance, at one point my edits to box.tpl.php are reflected immediatly when I was logged in as admin, or an authenticated user.

But anonymous users weren't seeing the updates at all. if I actually delete the server side phptemplate.engine--ya it glitches out. But even if I then re-upload a changed version of this file, it still shows me a cached version of it.

I'm stuck with what I'm seeing, but my pal hit my site and said he was seeing a different version. I've tried hard refreshing, to see if it was on my end--but I couldn't get any changes.

I'm getting simliar behavior out of box.tpl.php. I've made some very awesome conditional edits in this template to keep certain box titles from being displayed and those were being reflected. But as the night wore on last night I would make quick and small edits, re-up them and then I wasn't seeing the changes happen right away.

Now things aren't really responsive at all, and I'm wondering what is going on. I actually went to bed last night hoping that somehow the caches would be refreshed when I got up, but alas, no dice.

js

ps. There's a note on overridign other theme functions that says: "Note that you will need to visit admininster > themes for PHPTemplate to refresh its cache and recognize the new file. Beginning with version 4.6, this is not necessary anymore." I'm wondering if this is for real. Is there any way to manually trip a template cache reset to see?

dandaka’s picture

I don't think it's a phptemplate issue. I have "default" installation with only xtemplate engine and experiencing same problems.

jetsetter’s picture

Can anyone weigh in on this? Are there caching issues in 4.6?

js

dandaka’s picture

Which drupal version do you use?

heine’s picture

Does the clock on the server match the time of your computer?
--
Tips for posting to the forums

dandaka’s picture

Does it have to? Of course not. Server has GMT+3 time, I have GMT+2.

heine’s picture

Because of such headers as

Browser: If-Modified-Since: Tue, 15 Nov 2005 16:11:26 GMT

Server: Expires: Sun, 19 Nov 1978 05:00:00 GMT
Server: Last-Modified: Tue, 15 Nov 2005 16:15:40 GMT

it's nice if the clocks are the same.

Note: Local time = clock + value (eg -1 -2 +1 +2)

(Try ethereal to look at these headers)
--
Tips for posting to the forums

dandaka’s picture

I've used LiveHTTPHeaders extension to firefox to look at headers. But there are no "browser" or "server" headers.

first query (shows me outdated page)

http://kneiphof.ru/

GET / HTTP/1.1
Host: kneiphof.ru
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051107 Firefox/1.5
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: ru,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://kneiphof.ru/node/1
Cookie: PHPSESSID=814e700925f159fef6724b3982fc4d36

HTTP/1.x 200 OK
Date: Fri, 18 Nov 2005 10:18:08 GMT
Server: Apache/1.3.33 (Unix)
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
Age: 65 <b>// difference!</b>

-----------------

second query with ctrl-F5 (shows me correct page)

http://kneiphof.ru/

GET / HTTP/1.1
Host: kneiphof.ru
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051107 Firefox/1.5
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: ru,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://kneiphof.ru/node/1
Cookie: PHPSESSID=814e700925f159fef6724b3982fc4d36
Pragma: no-cache <b>// difference!</b>
Cache-Control: no-cache <b>// difference!</b>

HTTP/1.x 200 OK
Date: Fri, 18 Nov 2005 10:20:08 GMT
Server: Apache/1.3.33 (Unix)
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
dandaka’s picture

I've got solution. Not best, but worked for me.

jetsetter’s picture

Way to hold the line on this one Genie. Keep it up.

js