The script is downloaded twice
Reported by
nives...@gmail.com,
Mar 24 2016
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36 Steps to reproduce the problem: 1. Open HTML file 2. Check the network tab 3. Script is downloaded twice What is the expected behavior? Script is downloaded once. What went wrong? Script is downloaded twice Did this work before? N/A Chrome version: 49.0.2623.87 Channel: stable OS Version: OS X 10.10.5 Flash Version: Shockwave Flash 21.0 r0
,
Mar 24 2016
i have attached screenshot for firefox Network panel.
,
Mar 24 2016
Can you please provide a file where this problem replicates?
,
Mar 24 2016
,
Mar 24 2016
@nivesoft : I tried executing your file. I did not get misbehaviour in normal window . But when I tried after switching to another person window, I got the issue while hard refresh( cmd + shift + R ) after 1 or 2 times.
,
Mar 24 2016
Can you also provide a network log when this happens so that we can see what's going on? This page describes how to provide network details: https://sites.google.com/a/chromium.org/dev/for-testers/providing-network-details.
,
Mar 25 2016
I have attached network log file. check it.
,
Mar 25 2016
Most of the files are downloaded twice. Please check my above attached logs.
,
Mar 25 2016
We have analysed little detail, in order to find whether execution occur multiple times ? We put console log in each file and executed the same in our local, but the result seems to be fine. Yes, execution happening only once. But when we check our access log and chrome network panel seems download happening multiple times. Please refer the attached screenshots.
,
Mar 28 2016
,
Mar 28 2016
The resources are being requested with the BYPASS_CACHE load flag and the "Cache-Control: no-cache" request header. Not something the network stack does itself, so these are combing from the renderer process somewhere.
,
Mar 30 2016
Is this a Blink loader(renderer) bug?
,
Mar 30 2016
I have tried this in multiple browsers, Trident ( IE ), Gecko ( Firefox ), WebKit ( Safari ) and Blink ( Chrome and Opera ), I can able to reproduce this only in Chrome and Opera. So, both use Blink engine.
,
Apr 1 2016
Any update?
,
Apr 6 2016
I can consistently reproduce this given the file provided in comment 4. On first glance, it looks to me like we may be first requesting these files via the preload scanner, then re-requesting them when the parser actually needs them, rather than using the preload scanned versions. When the files are re-requested, I see them being requested in a stair-step in the waterfall that's consistent with the time that the parser requests them. Adding pmeenan, japhet, and csharrison to get their take. Where is the logic that tries to match parser requests with preload scanned responses? Do we have a sense for why it might not be matching these requests? One subtle but perhaps important detail: the load flags for the parser requested version are load_flags = 258 (BYPASS_CACHE | VERIFY_EV_CERT) whereas the load flags from the preload scanned version, which is loaded first, are (BYPASS_CACHE | MAYBE_USER_GESTURE | VERIFY_EV_CERT). Perhaps we are encountering a miss because the load flags are different?
,
Apr 6 2016
Thanks for looking into this. My guess is It's more likely due to the double BYPASS_CACHE flags rather than MAYBE_USE_GESTURE on the second flag.
,
Apr 6 2016
Is BYPASS_CACHE the correct flag here? These are just plain https script resources. Not clear why we'd be using bypass cache for those.
,
Apr 6 2016
One more note: I would expect the second load of the resource, which seems to happen when the HTML parser encounters the script, to find the preloaded resource fetched during preload scanning, on the render process side, and not dispatch a second request down to net. So this seems like an issue on the render process side.
,
Apr 6 2016
Pretty much all URL_REQUESTs have BYPASS_CACHE. Are you doing a shift-reload to trigger this?
,
Apr 6 2016
Yeah. mmenke noted the BYPASS_CACHE flag in his comment above as well. Perhaps the BYPASS_CACHE flag is not the real issue here. For some reason the render-side logic to pair up preloaded requests doesn't seem to be doing so, as best I can tell. Assigning to Nate just to get a sanity check on this, since I don't understand this code well. Nate, which code in blink matches up preloads requested from the html preload scanner with the later use of that resource when e.g. the parser actually encounters a blocking script and needs to load it? Do you have a sense as to whether/why we might be failing to match requests up in some cases, and allow the requests to fall through to the net stack? Nate, please feel free to unassign once you've taken a look and left comments. Thanks!
,
Apr 6 2016
Yes, agreed.
,
Apr 6 2016
By removing the "language" attribute on the scripts I've stopped the double downloading. I know exactly where that check is in the code though.
,
Apr 6 2016
Sorry, that should say I *don't* know exactly where that check is in the code. I'm taking a look though.
,
Apr 6 2016
I tested the script on TOT (#385459) and could not reproduce.
,
Apr 14 2016
Is this Issue fixed in Version 50.0.2661.75 (64-bit)? Its working properly, Script is downloaded once. Thx.
,
Apr 14 2016
Marking as fixed for now, given this doesn't repro anymore. Please re-open if you are able to repro on Chrome 51+. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by udhayagi...@gmail.com
, Mar 24 2016