#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    12
    Rep Power
    0

    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?
    Thanks
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    12
    Rep Power
    0
    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.
  4. #3
  5. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,001
    Rep Power
    9398
    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.

IMN logo majestic logo threadwatch logo seochat tools logo