August 31st, 2012, 06:21 PM
Apache returns HTTP 304 for included files
I have a weird problem with some of my webpages - whenever a file is 'included' (<link> and PHP includes) the relevent content doen't show up. When I checked the logs, the server was responding with a '304 Not modified' status. This made me think it was to do with the browser so I cleared the cache with no luck - I got the same error on other computers. Can anyone give me any pointers?
September 6th, 2012, 05:32 PM
Well I've solved it, because I was linking to files that didn't exist! The trouble is, why didn't apache record a 404 error in the logs? If it had, I would've solved the problem in seconds.
September 6th, 2012, 06:13 PM
Hmm. Design decision? Technically it's correct behavior as the document hasn't been modified (since the browser last requested it), though one would expect a 404...
A "hard" refresh, like Ctrl+F5, should show you a 404 again as the browser will re-request the page without using caching.