Network.responseReceived reports params.response.fromDiskCache as false even though request is cached
Reported by
tomi.mic...@gmail.com,
Jul 6 2017
|
|||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 Steps to reproduce the problem: 1. in extension, chrome.debugger.onEvent.addListener(onNetworkEvent); 2. run extension and debug it 3. see values of Network.responseReceived event / params.response.fromDiskCache What is the expected behavior? If request is cached, fromDiskCache should say true. Or then add fromMemCache field or whatever to detect cache use. What went wrong? chrome.debugger.onEvent.addListener(onNetworkEvent); On onNetworkEvent callback, the Network.responseReceived event sometimes reports params.response.fromDiskCache as false even though request is cached. Must use event Network.requestServedFromCache to really see the status of cache. See sources of my chrome extension https://github.com/tomimick/chrome-ext-page-size WebStore page: https://chrome.google.com/webstore/detail/oepnndnpjiahgkljgbohnnccmokgcoln Did this work before? N/A Chrome version: 59.0.3071.115 Channel: stable OS Version: OS X 10.12.5 Flash Version:
,
Jul 26 2017
,
Aug 4 2017
Sorry for being slow to respond - holidays... Maybe best to demonstrate is this: - install my official extension https://chrome.google.com/webstore/detail/oepnndnpjiahgkljgbohnnccmokgcoln - download extension sources from github https://github.com/tomimick/chrome-ext-page-size - open zip to a folder - in sources, comment out my last fix for this, line bg.js:334 like this: //cachedList[params.requestId] = 1; - the change above means: ignore Network.requestServedFromCache and just rely on resp.fromDiskCache (which is broken) - activate it as a local extension via "Load unpacked extension" - compare the numbers for both extensions, for example with page https://yle.fi/uutiset/3-9758920 - cached numbers differ, my fixed extension reports something like 8 requests whereas the broken modified extension reports around 12, there are atleast few images that don't seem to be cached even though they are - the images are served via cloudinary and HTTP2, does it affect? - I think the differences used to be larger before Chrome 60, not quite sure
,
Aug 4 2017
Thank you for providing more feedback. Adding requester "sandeepkumars@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 9 2017
Tested this Mac 10.12.6 with chrome #59.0.3071.115 and faced an issue with extension downloaded from "https://github.com/tomimick/chrome-ext-page-size" url As mentioned in comment #3, i have edited the bg.js file and loaded the extension from "Load unpacked extension" then i clicked on the extension icon and observed an empty popup. Attaching a screen-cast for reference. tomi.mickelsson@ Could you please look into it and let us know your observations.
,
Aug 9 2017
Ah sorry, the sources from Github require a build step first! Here are the built sources with the fix removed. Try this and the official one and see the difference in figures.
,
Aug 9 2017
Thank you for providing more feedback. Adding requester "kkaluri@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 21 2017
Tested this issue on Mac 10.12.6 with chrome #59.0.3071.115 with the provided extension in comment #6. Observations: 1. For WebStore extension, observed the values as transferred/cached = 60/96 2. For Unpacked extension, observed the values as transferred/cached = 115/7 Observed that for unpacked extension cached value is very low when compared to Webstore extension. Attaching the screen-cast for reference. tomi.mickelsson@ Could you please confirm this is the issue you are experiencing ? Thank You...
,
Aug 24 2017
Well the numbers seems to vary a bit. My numbers for an incognito tab are: - fixed released extension 17/107 - buggy version 101/23 The ratio of wrong cache data is clear anyway.
,
Aug 24 2017
Thank you for providing more feedback. Adding requester "kkaluri@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 30 2017
@tomi.mickelsson-- Thanks for providing reply, we have noticed different values in different versions and for web-store and unpacked versions on Chrome reported #59.0.3071.115 and latest #60.0.3112.113. Could you please help us in identifying the ideal values to be considered and take them as benchmark values. This would help us in further triaging the issue. Values observed: Chrome Version: 59.0.3071.115 Unpacked Extensions: 57/88, 22/99 Downloaded from Webstore: 30/101, 18/101, 18/49 Chrome Version: 60.0.3112.113 Unpacked Extensions: 18/99, 19/101, 22/100 Downloaded from Webstore: 21/96, 18/104 Attached the screencast for reference in the link provided. https://drive.google.com/drive/folders/0B91MtOa4hcAbNVMzN1JCX2tTQlU?usp=sharing Thanks in advance.
,
Nov 7 2017
Marking the issue as WontFix, as there is no update from the reporter for more than 1 month. @tomi.mickelsson -- Please feel free to raise a new issue if able to reproduce the issue using latest chrome builds. Please use the following link to download latest chrome builds https://www.chromium.org/getting-involved/dev-channel Thanks! |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by sandeepkumars@chromium.org
, Jul 11 20177.0 MB
7.0 MB View Download