Bug 216125

Summary: Fetch requests with 304 Not Modified response don't hit cache
Product: WebKit Reporter: Patrick Angle <pangle>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: karlcow, pangle, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Resources to reproduce issue - needs Apache server with PHP support. none

Description Patrick Angle 2020-09-03 09:06:57 PDT
Created attachment 407883 [details]
Resources to reproduce issue - needs Apache server with PHP support.

Requests made via `fetch(…)` in JavaScript will not hit the cache for some types of resources, like text and json files even when the content is otherwise in the cache. Other resources, like PHP pages will hit the cache under similar circumstances.

I’ve been using these test resources to reproduce the issue. Needs to be hosted on an HTTP/PHP server. There is a hidden .htaccess file in here as well that is part of the test to make sure caching headers are set for the static resource.

You can observe in the JS console that 304 responses for the text/json files don’t return any body.
Comment 1 Patrick Angle 2020-09-03 09:07:08 PDT
<rdar://68241104>