Bug 216125 - Fetch requests with 304 Not Modified response don't hit cache
Summary: Fetch requests with 304 Not Modified response don't hit cache
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-03 09:06 PDT by Patrick Angle
Modified: 2024-01-04 21:55 PST (History)
3 users (show)

See Also:


Attachments
Resources to reproduce issue - needs Apache server with PHP support. (22.34 KB, application/zip)
2020-09-03 09:06 PDT, Patrick Angle
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>