w3c / w3c/ServiceWorker

How to get correct connectStart/End values of a proxied http request inside service worker?

Open
#1,663 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Bikeshed
Stars
3.6k
Forks
324
Avg merge
14d 22h
Merged PRs (30d)
1

Description

Our website uses service worker to proxy http requests. When service worker is enabled, the connectStart and connectEnd values returned by window.performance API are always the same as workerStart. If we disable service worker, these values become correct, and we can then measure the DNS cost, TCP connection cost.

Image 1, service worker enabled:

image

Image 2, without service worker:
image

I find something useful in Chrome Dev Tool. How can I access this timing info in service worker?
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported window.performance timing values for requests proxied by a service worker, comparing connectStart and connectEnd with workerStart and the timing view in Chrome DevTools. Determine whether the Service Worker or Performance APIs expose this connection timing information, and consider the issue complete when the behavior or supported access path is established and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance, web-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.