Page 1 of 1

[SOLVED] If-Modified-Since / If-None-Match

Posted: Sun Jan 04, 2004 10:30 pm
by Roja
I have a fedora server with:

PHP-4.3.3
Apache-2.0.47

I do a dump of the headers, and I do not have the If-Modified-Since header or the If-None-Match header. Not when refreshing, not at all.

The code I use:

Code: Select all

$headers = getallheaders();
var_dump($headers);
Is there an apache setting to enable these headers, or something I am doing wrong?

I'm trying to add etag and expiration checking, but I need to check these headers, and they are not present.

Posted: Sun Jan 04, 2004 11:03 pm
by Roja
I figured it out.. you only get those if you dont load it straight, or shift-refresh.

In other words, you have to load the page, and then reload (no shift).

Then you see those headers.

Posted: Sun Jan 04, 2004 11:13 pm
by volka
you're using internet explorer?
Does the script generate other headers - like cache-control esp. pre-/post-check?

Posted: Mon Jan 05, 2004 7:43 am
by Roja
volka wrote:you're using internet explorer?
No. I used Firebird primarily, but IE and Opera showed similar behavior.
volka wrote: Does the script generate other headers - like cache-control esp. pre-/post-check?
Almost always, yes it did.

Like I said, once I simply hit refresh (not shift-refresh, which forces a completely new load regardless of cache status), the header did come up.

Problem solved. :)