WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
211414
performance.getEntriesByType('resource') does not include script 404 responses
https://bugs.webkit.org/show_bug.cgi?id=211414
Summary
performance.getEntriesByType('resource') does not include script 404 responses
Eli Grey (:sephr)
Reported
2020-05-04 17:19:48 PDT
Created
attachment 398439
[details]
HTML script element-initiated request with 404 response (comparing Firefox, Safari, Chrome, and Edge) This is equivalent to the following Chrome bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=883400
Steps to reproduce the problem: 1. Load a page that requests a script that responds with a status code of 404. 2. Open Console in Developer Tools 3. Enter "var urls = []; window.performance.getEntriesByType('resource').forEach(function(r){urls.push(r.name)});" 4. The URL returning the 404 will not be displayed in the list of URLs What is the expected behavior? The URL returning the 404 should be displayed in the list of URLs. See the attached screenshots to see how Safari treats 404s from different request initiator types. Firefox is the only browser that implements this correctly.
Attachments
HTML script element-initiated request with 404 response (comparing Firefox, Safari, Chrome, and Edge)
(1.83 MB, image/png)
2020-05-04 17:19 PDT
,
Eli Grey (:sephr)
no flags
Details
HTML img element-initiated request with 404 response (comparing Firefox, Safari, Chrome, and Edge)
(1.89 MB, image/png)
2020-05-04 17:21 PDT
,
Eli Grey (:sephr)
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Eli Grey (:sephr)
Comment 1
2020-05-04 17:21:55 PDT
Created
attachment 398440
[details]
HTML img element-initiated request with 404 response (comparing Firefox, Safari, Chrome, and Edge) This screenshot shows how Safari correctly includes 404 responses from <img> elements, but not <script> elements.
Radar WebKit Bug Importer
Comment 2
2020-05-06 15:02:06 PDT
<
rdar://problem/62947219
>
Eli Grey (:sephr)
Comment 3
2020-05-06 16:34:19 PDT
A Chrome engineer has submitted a patch for the corresponding Chrome bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=883400#c28
This may be useful for the WebKit fix.
Brent Fulgham
Comment 4
2022-02-12 21:02:39 PST
This is actually: <
rdar://44388482
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug