Bug 193902

Summary: [Resource Timing] Should surface entries for failed requests (DNS, TCP, SSL, 4xx, 5xx)
Product: WebKit Reporter: Nic Jansma <nic>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: REOPENED ---    
Severity: Normal CC: achristensen, noam
Priority: P2    
Version: Safari 12   
Hardware: All   
OS: All   

Description Nic Jansma 2019-01-28 04:36:37 PST
This is a request for an un-do of https://bugs.webkit.org/show_bug.cgi?id=104762

Per the latest ResourceTiming (Level 2) spec:

https://www.w3.org/TR/resource-timing-2/#resources-included-in-the-performanceresourcetiming-interface

> If a resource fetch was aborted due to a networking error (e.g. DNS, TCP, or TLS error), then the fetch MAY be included as a PerformanceResourceTiming object in the Performance Timeline with initialized attribute values up to the point of failure - e.g. a TCP handshake error should report DNS timestamps for the request, and so on.

While the language says MAY, I'm requesting that failed entries (transport-level and HTTP 4xx/5xx) be included in ResourceTiming in Safari.
Comment 1 Alex Christensen 2021-05-11 11:03:14 PDT

*** This bug has been marked as a duplicate of bug 202040 ***
Comment 2 Nic Jansma 2021-05-12 21:06:08 PDT
@Alex this isn't fully addressed though, transport-level errors (DNS/TCP/SSL) still don't surface a ResourceTiming entry.

Test case at: https://nicj.net/dev/resourcetiming/error-resources.html

The 4xx and 5xx cases work now thanks!
Comment 3 Alex Christensen 2021-05-13 09:00:13 PDT
Reopening then
Comment 4 Alex Christensen 2021-05-27 11:09:38 PDT
See https://github.com/whatwg/fetch/issues/1215
Comment 5 Noam Rosenthal 2021-09-26 02:20:46 PDT
I'm currently editing the spec to explicitly create resource timing entries for network errors.

Track https://github.com/whatwg/fetch/pull/1311 for spec work
Track https://github.com/web-platform-tests/wpt/issues/30968 for tests