4

Why does Chrome show 304 in Response Headers section but 200 in Status code? Why doesn't it show 304 in Status code (BTW, that is NOT 200 memory cache.)?

If it shows 200 I can't know it is actually 304 without looking into request detail.

Compared to Firefox (the same request), 304 in status code.

---- update---

To make my question clear (based on an answer I got), I believe Chrome got the result from cache, after all that is what 304 is for. So why did Chrome showed 200 then?

1

I understand from your question that you don't think it's pulling from cache. I'm not sure why you believe that or if I'm not understanding your question

According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304, the HTTP 304 status code indicates

an implicit redirection to a cached resource.

And that

Many developer tools' network panels of browsers create extraneous requests leading to 304 responses, so that access to the local cache is visible to developers.

I interpret this to mean that your developer tool is asking for the cache, not necessarily Chrome. I.e., your browser would normally only get the 200, but the developer tool makes the extra request for the cache so you can see it.

You could always run a packet sniffer and see if you get both status codes when you aren't running the developer tools extension.

| improve this answer | |
  • I don't think you got my question. I think Chrome got it from cache. That was 304 is for. But I don't get why Chrome show 200. Hence my question. – Qiulang Mar 19 at 14:30
  • What if you try Ctrl+F5 and try forcing it to bypass cache? – Trebor Mar 19 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.