Bug 275248

Summary: Safari doesn't send the If-None-Match header when the response contains the stale-while-revalidate header
Product: WebKit Reporter: Boris Ozegovic <boris.ozegovic>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: achristensen, annevk, ap, beidson, cdumez, youennf
Priority: P2    
Version: Safari 17   
Hardware: Mac (Apple Silicon)   
OS: macOS 14   

Boris Ozegovic
Reported 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
Attachments
Boris Ozegovic
Comment 1 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>
Alexey Proskuryakov
Comment 2 2024-06-07 17:21:39 PDT
*** This bug has been marked as a duplicate of bug 20160 ***
Note You need to log in before you can comment on or make changes to this bug.