Apache simply stat()s the file and compares the timestamp to the If-Modified-Since timestamp. If the file’s timestamp is less than or equal to the If-Modified-Since header, it returns 304 Not Modified.