While testing resource caching over Safari it's been observed that some of the information related to resource caching in the Network Tab of Web Inspector is wrong/misleading, or Safari may be having some random behaviour regarding resource caching.
All our resources are using a "Cache-Control" response header with value "max-age=0, must-revalidate", so we're expecting that Safari will always revalidate with the server. Our resources are Javascript, CSS, and HTML static files.
For these requests, where a 304 (Not Modified) response status is expected, Web Inspector is *sometimes* displaying a 200 (OK) response status, along with that a Transferred value of 0. Other responses properly display the 304 status along with 204 B size (the expected result). All requests display the Cached file as Yes.
- Do you have any idea why some resources seem to have a 200 status + 0 bytes transferred, whilst others have the expected 304 status + 204 B transferred?
- Could the 200 status + 0 transferred bytes mean that Safari isn't actually attempting to revalidate the resource with the web server? (all resources in the app are served with the same "Cache-Control" response header so we would expect Safari to behave in the same way for all.
- Is there any place where information about the meaning of the different columns in Web Inspector tab can be found? (The Web Inspector guide seems updated only up to Safari 6.1).
We're testing on Safari 9.1.3. I've reviewed release notes for all WebKit 10 releases but I couldn't find reports of any fix in this area of the browser.
Thanks in advance for any inputs you may provide.