Closed
Bug 1209382
Opened 10 years ago
Closed 10 years ago
fetch requests don't show up as XHR requests
Categories
(DevTools :: Console, defect, P1)
Tracking
(firefox45 fixed)
RESOLVED
FIXED
Firefox 45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: peterbe, Assigned: tromey)
References
()
Details
(Whiteboard: [polish-backlog])
Attachments
(3 files, 1 obsolete file)
Steps to reproduce:
1. Visit http://www.peterbe.com/ajaxornot/view6 with the Console panel open.
2. In the "Net" sub-panel, make sure "XHR" is selected and "Log" is *not*.
3. Refresh the page if you have to.
Expected result.
The javascript does does a fetch() to `/ajaxornot/view6-data`. Expect to see that request in the console with a little XHR badge.
Actual result.
It doesn't show up. Re-enabling the "Log" option under "Net" you see that these requests are treated like regular file resources like images and CSS.
Reporter | ||
Comment 1•10 years ago
|
||
Note: This web app uses the native fetch API [0] which perhaps does things differently from jQuery.ajax or ng-http or one of those. The web app has a polyfill [1] but I don't think it's kicking into effect in Fx 43.
Perhaps the XHR badge is based on the `X-Requested-With: XMLHttpRequest` header. Either way, it's XHR and so it should have the badge I guess.
[0] https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
[1] https://github.com/github/fetch
Updated•10 years ago
|
Priority: -- → P1
Whiteboard: [polish-backlog]
Comment 2•10 years ago
|
||
Note that the request also isn't showing up in the netmonitor when the XHR filter is applied
Comment 3•10 years ago
|
||
Another example that uses fetch alongside an xhr request: http://jsfiddle.net/8kfr826j/
Comment 4•10 years ago
|
||
The fetch request shows up as 'other' in the netmonitor in this example
Reporter | ||
Comment 5•10 years ago
|
||
This demonstrates the problem in Brian's jsfiddle.
But the worst problem is that I often don't want to see the noise of downloading lots of static assets, so normally I switch of "Log" under the Console tab. But I can't with fetch requests.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → ttromey
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•10 years ago
|
||
Assignee | ||
Comment 7•10 years ago
|
||
Comment on attachment 8680169 [details] [diff] [review]
make Fetch requests show up as XHR in network monitor
Change the network monitor to categorize Fetch requests as "XHR".
Attachment #8680169 -
Flags: review?(vporof)
Updated•10 years ago
|
Attachment #8680169 -
Flags: review?(vporof) → review+
Assignee | ||
Comment 8•10 years ago
|
||
Assignee | ||
Comment 9•10 years ago
|
||
Fix test URL -- worked locally but not in try.
Attachment #8680169 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8683887 -
Flags: review+
Assignee | ||
Comment 10•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 11•10 years ago
|
||
Keywords: checkin-needed
Comment 12•10 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•