How to get correct connectStart/End values of a proxied http request inside service worker?
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 2, without service worker:

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

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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