Bug 275248 - Safari doesn't send the If-None-Match header when the response contains the stale-while-revalidate header
Summary: Safari doesn't send the If-None-Match header when the response contains the s...
Status: RESOLVED DUPLICATE of bug 20160
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: Safari 17
Hardware: Mac (Apple Silicon) macOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-07 01:51 PDT by Boris Ozegovic
Modified: 2024-06-07 17:21 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Ozegovic 2024-06-07 01:51:33 PDT
Version: 17.5 (19618.2.12.11.6)
Component: Network


Description: 

1. Please create a resource and add cache headers
  - no-cache, stale-while-revalidate=Integer >= 0 or
  - max-age=0, stale-while-revalidate=Integer >=0

 
2. Create a simple HTML file, something like this will suffice

```
<html>
<head>
    <script type="text/javascript" src="https://localhost:8081/static/js/getTranslations.js"></script>
</head>
<body>
</body>
</html>


```

3. Load the file in Safari, open the network tab, and observe. Refresh a couple of times.

Actual: Safari will never send the If-None-Match header. Safari will fetch the whole resource on subsequent calls.
Expected: Safari should completely ignore stale-while-revalidate and send the. If-None-Match header. The resource should return 304

3. If we were to remove stale-while-revalidate or if stale-while-revalidate is present but doesn't contain a value, Safari will send the If-None-Match header
Comment 1 Boris Ozegovic 2024-06-07 07:06:35 PDT
You can use this HTML, you don't have to create a resource

<html>
<head>
    <script type="text/javascript" src="https://stale-while-revalidate-test.glitch.me/somefile.js"></script>
</head>
<body>
</body>
</html>
Comment 2 Alexey Proskuryakov 2024-06-07 17:21:39 PDT

*** This bug has been marked as a duplicate of bug 20160 ***