Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deprecation] chrome.loadTimes() is deprecated #94

Closed
zhanglianxin opened this issue Dec 21, 2017 · 1 comment · Fixed by #95
Closed

[Deprecation] chrome.loadTimes() is deprecated #94

zhanglianxin opened this issue Dec 21, 2017 · 1 comment · Fixed by #95
Assignees
Labels

Comments

@zhanglianxin
Copy link

Google Chrome Version 64.0.3282.39 (Official Build) beta (64-bit)

[Deprecation] chrome.loadTimes() is deprecated, instead use standardized API: nextHopProtocol in Navigation Timing 2. https://www.chromestatus.com/features/5637885046816768.
SPDY @ chrome-extension://****/js/detector.js:393

Although it's a warning message, the extension doesn't work normally.

I found this page may be helpful (Chrome 64 to deprecate the chrome.loadTimes() API).

@justjavac
Copy link
Owner

justjavac commented Dec 21, 2017

I will fix it https://developers.google.com/web/updates/2017/12/chrome-loadtimes-deprecated#wasfetchedviaspdy

function wasFetchedViaSpdy() {
  // SPDY is deprecated in favor of HTTP/2, but this implementation returns
  // true for HTTP/2 or HTTP2+QUIC/39 as well.
  if (window.PerformanceNavigationTiming) {
    const ntEntry = performance.getEntriesByType('navigation')[0];
    return ['h2', 'hq'].includes(ntEntry.nextHopProtocol);
  }
}

@justjavac justjavac self-assigned this Dec 21, 2017
@justjavac justjavac added the bug label Dec 21, 2017
justjavac added a commit that referenced this issue Jan 4, 2018
justjavac added a commit that referenced this issue Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants