When using Codeigniter or a simple php pag开发者_运维百科e, loadin my test page once I get the normal 200 status but if it is cached I get the 304 message. I realize this is just a signal that the resource is cached but could I avoid it? If so, how? Thank you.
... or you could just do
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
in your PHP files right at the top. That way you have control over which pages not to cache and leave Apache running as it should.
If you don't want the page to be cached by browsers you need to configure the apache server to send the appropriate headers.
精彩评论