I was running into a problem where PHP was automatically sending the following HTTP headers:

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
This caused a problem in that my browser (Camino) would not let me view source without reloading the page. For state-based pages, that was a nightmare and meant I couldn't use my main browser for development!

Now that I have identified the problem, I am wondering what the point of those headers are, and whether I need them. I can definitely overwrite them using the header() function but am not sure if I should.

My web app does set cookies (uses PHP sessions). I believe that it is the setting of the cookie that triggers PHP to send those headers. If I don't set a cookie on a PHP script, those headers are not sent.

Any ideas about how I can manage cache-control properly so that I can view source in Camino? Interestingly, it's the only browser that actually follows the cache-control directives; fox, safari, IE ignore them. But of course, I've got my browser pimped just the way I like it... don't want to switch!