Avatar

Bug in My Little Forum (Bugs)

by Auge ⌂, Tuesday, April 11, 2017, 13:25 (2543 days ago) @ danielb987

Hello

After reading a few articles about the issue, I'm a bit confused. The IE is not safely identifiable with it's user-agent-string. That causes the IE to use and misinterpret a caching directive, that should stay hidden from this browser (because of an issue from the year 2007 (wow!)).

Because we can't identify the IE, we have to use a caching header, that works in all browsers and we have to remove the switch to distinguish between IE and all other browsers.

I found a nice article about the possible values of the caching header from the year 2008 on archive.org. The no-cache-directive says that the browser can cache the page but should (but not must) request a revalidation of the page by the web server. But the IE and the FF act on this directive as it would be no-store (no caching of the requested page ever!). That's in opposition to your report of unwanted caching in the IE.

Changing the cache-control from public to private seems to be reasonable. The value public let public proxy servers store the requested page. When set to private only the browser stores the page in it's own cache. But when we decide to change to no caching (Cache-control: no-store;) we wouldn't need a setting for public or private caching at all.

My problem is the validation of the changes because I haven't a IE on my systems. So I request for help. Please test the following caching headers for their behaviour in different browsers.

header('Cache-Control: private, max-age=300'); // only browser cache, must re-validate after 5 minutes
 
header('Cache-Control: private, must-revalidate'); // only browser cache, must re-validate on every request (my favourite)
 
header('Cache-Control: no-cache, no-store'); // no cache at all, no-cache as fallback as suggested in the linked article (from 2008!)

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread