Issue metadata
Sign in to add a comment
|
In the first few of logs can't display from Service Worker's fetch listener
Reported by
tsang...@gmail.com,
Oct 27 2016
|
||||||||||||||||||||
Issue description
Chrome Version : 56.0.2889.0 (开发者内部版本) (64 位)
56.0.2901.0 (正式版本) canary (64 位)
54.0.2840.71 (正式版本) m (32 位)
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
Safari:
Firefox:
IE:
What steps will reproduce the problem?
(1)create a service worker.
(2)add fetch listener
(3)use console to output something,eg:event.request.url
What is the expected result?
All logs display.
What happens instead?
In the first few of log can't display
Please provide any additional information below. Attach a screenshot if
possible.
,
Oct 28 2016
,
Nov 2 2016
,
Nov 2 2016
,
Nov 4 2016
I think if you check the "preserve log" check box in the console tab, you will see the first request.
,
Nov 4 2016
yeah! all displayed after I check the "preserve log" check box. Is this normal? actually I don't want to preserve log
,
Nov 4 2016
By default, the log is cleared on page reload/navigation, and the first fetch event for the navigation occurs before that. It does seem like surprising behavior. pfeldman: Is this the desired behavior for some reason, or would you consider this a bug?
,
Nov 11 2016
assign to pfeldman for triage
,
Nov 21 2016
Good question! Seems like we want to keep this configurable and "Preserve log" is the answer here. |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by tsang...@gmail.com
, Oct 27 2016//In the first few of logs can't be displayed. self.addEventListener('fetch', function(event) { console.log(event.request.url); }) //all logs displayed self.addEventListener('fetch', function(event) { setTimeout(function(){ console.log(event.request.url); },1000) }) If set a setTimeout to run, all logs can be displayed.