Hello!

Looking at logs of my local proxy I found that my site responds with "200 OK gzip" for an anonymous user. It's completely OK but I was hoping to see "304 Not Modified gzip" when the user loads the same page again (if it's cached of course).

However I was always seeing "200 OK gzip". This means that cached page is always retrieved from server even if it was not modified.

Trying to find the reason I noticed that the pages were never saved to browser's cache and in the end I saw the following:
$string .= " Header set Cache-Control \"no-store, no-cache, must-revalidate, post-check=0, pre-check=0\"\n";
In boost.module and in cache dir .htaccess

When I removed no-store, no-cache it started working as I expected.

I thought that these directives were added to prevent the user from seeing an outdated content. However, if I delete a page from a cache it is served to the user instantly. So this is not the case.

And the question is - "What is the reason for no-store, no-cache?"

Comments

Georgii’s picture

Still no comments?

errolbert’s picture

(Why can't I delete a comment if I can totally edit it?)

kardinal’s picture

Issue tags: +location

Faced the same problem. Studied information mass. Check on presence of these signs ( ?> __ ) already did. Didn't help.

bgm’s picture

Status: Active » Closed (duplicate)
Issue tags: -location

For the http response 200 vs 304, see this issue: #1070232: Rely on etags for cache staleness.

It would be good to have more testing / feedback.
Marking this issue as duplicate. We can fix 1070232 in 7.x-1.x and backport to 6.x-1.x after.