Bug 187726

Summary: Web Inspector: Disable Cache doesn't affect preloaded content
Product: WebKit Reporter: Martin Häcker <spamfaenger>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bburg, ggaren, hello, inspector-bugzilla-changes, koivisto, oliverjash, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: All   
OS: All   
Attachments:
Description Flags
screenshot
none
code and video of reproduction none

Description Martin Häcker 2018-07-17 04:58:29 PDT
Created attachment 345151 [details]
screenshot

I've just noticed that `<link rel=preload ...>` content seems to completely ignore the 'disable cache' button in the webkit inspector.

This has the effect that on my development system I frequently get out of date data when working with javascript. Which is quite annoying.

See attached screenshot for an illustration of the problem.
Comment 1 Martin Häcker 2018-07-17 05:00:03 PDT
What I have in the html to load the script is this:

`<link rel="preload" as="script" href="/static/additional.js" />`

as well as

`<script src="/static/additional.js"></script>`
Comment 2 BJ Burg 2018-07-17 08:38:26 PDT
Are you able to reproduce this in a standalone test case? That would really help us to isolate and fix the issue.
Comment 3 Radar WebKit Bug Importer 2018-07-17 08:40:11 PDT
<rdar://problem/42286512>
Comment 4 Martin Häcker 2018-07-17 12:06:32 PDT
Created attachment 345179 [details]
code and video of reproduction
Comment 5 Martin Häcker 2018-10-16 02:05:43 PDT
Hello @maintainers: any progress on this? This is _mightiliy_ annoying when trying to develop with Safari on a page that uses preloaded content. As far as I can tell neither Firefox nor Chromium behave this way, so I would be very surprised if this works as intended.

Also, does my reproducer work for you? Do you need more input?
Comment 6 Martin Häcker 2018-10-16 02:10:50 PDT
Some more info I can add from my testing: If a page preloaded a script it seems
* I can not reload any other page from the same site to get a new version of the script
* Emptying the cache (command-alt-e) doesn't trigger a reload of the script
* Force Reloading (command-alt-r) doesn't trigger a reload of the script.

What we do:
* We have an entry page that contains the preload statements
* all other pages just reference the scripts as usual
Comment 7 Oliver Joseph Ash 2019-01-17 05:33:55 PST
I opened a new issue for this: https://bugs.webkit.org/show_bug.cgi?id=193533, as the bug is not specific to the "Disable Cache" feature in the web inspector.

If a request is preloaded, Safari will always retrieve it from the cache, regardless of the cache headers for that request.