0

Okay, i've got a website (https://illution.dk) and almost all of my included/linked files are sending out an "304 Not Modified" header. Except for: https://illution.dk/include/style.php which is always returning an "200 OK". My headers for style.php are:

HTTP/1.1 200 OK => 
Date => Fri, 11 Nov 2011 15:44:39 GMT
Server => Apache/2.2.6 mod_auth_kerb/5.3 PHP/5.2.17 mod_fcgid/2.3.5
X-Powered-By => PHP/5.2.17
Expires => Sat, 12 Nov 2011 16:44:39 CET
Cache-Control => max-age=290304000, public
Pragma => 
Set-Cookie => PHPSESSID=dkh4jdqko9t6ihp760sn4v28a2; path=/; domain=.illution.dk
Last-Modified => Fri, 11 Nov 2011 15:52:18 GMT
Connection => close
Content-Type => text/css

What can the problem be?

Thanks in advance!

2
  • Can you also include headers for the files that DO cache? Commented Nov 11, 2011 at 15:55
  • I know, but I can't do anything about it... Commented Nov 11, 2011 at 16:11

1 Answer 1

1

In my test, the browsers sends the If-Modified-Since header

If-Modified-Since:Fri, 11 Nov 2011 15:57:48 GMT

But the page returned has the following modified date

Last-Modified:Fri, 11 Nov 2011 15:58:44 GMT

which is later that the If-Modified-Since date, which means the server side(PHP) thinks it always has a later version than the browser's cached version, causing it to send back the file every time.

Sign up to request clarification or add additional context in comments.

1 Comment

Why is the browser sending an "Cache-Control:max-age=0"?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.