Do browsers have cache error responses?

I am setting response headers for some requests as:

Cache-Control : "Private, max-age=21600";

      

If the same request fails, I repeat it for the same request. My doubt is if the browser is caching such error responses or not?

I tried to simulate this scenario with a fiddler. I returned 404-not found

for the request and checked if the chrome://cache

cache contained this response with a 404. When I deleted the request from fiddler I got a 200 OK.

But still, I don't understand why the browser had this 404 response in its cache?

Thank.

+3


source to share


1 answer


Late answer, but yes Chrome is caching 404 responses. You can add non-cache headers to prevent this; I think the HTML documentation even mentions this. There are some Apache / Nginx fixes on this forum.



0


source







All Articles