Closed Bug 563623 Opened 15 years ago Closed 4 years ago

Add API for origin of a network (HTTP) request

Categories

(Core :: Networking, defect, P5)

x86
Windows Vista
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: Honza, Unassigned)

References

(Depends on 3 open bugs)

Details

(Whiteboard: [firebug-p3][necko-would-take])

Attachments

(1 file)

This bug is related to a Firebug issue reported here: http://code.google.com/p/fbug/issues/detail?id=3053 It would be very useful for web developers to be able (using Firebug) to find the place where (in context of a web page) a network (HTTP) request has been originated. For example: - in case of an image request, the developer would be able to see the source <img> element that initiated it. - in case of a CSS image property, the developer would be able to see URL of the *.css file + line number (e.g.: background: url(image.png)) from where the image has been requested. etc. Would it be feasible to provide such APIs for Firebug (and potentially for other tools) ? Honza
Whiteboard: [firebug-p3]
> - in case of an image request, the developer would be able to see the source < <img> element that initiated it. Images in particular use a single HTTP request for multiple <img> elements, possibly across different documents. In any case, in general Necko does not have this information. All consumers could be changed to pass something useful for the aContext argument of asyncOpen, but for the CSS case you describe above this could have a pretty nontrivial performance cost if nothing else. All that said, this could be used as a tracking bug for adding such aContext arguments; specific bugs would need to be filed on every place that starts a network load to pass a useful context.
FWIW, Web Inspector already has this (while it doesn't seem to be accurate all the time). Sebastian
> Images in particular use a single HTTP request for multiple <img> elements, > possibly across different documents. Only one element is the initiator of the network request, so it would be correct to just provide one element in this case. Sebastian
There was question with a good use case for this feature on stackoverflow.[1] That was finding the cause of a 404 page. IMO this should get a higher priority, because it's an important way to debug pages. Sebastian [1] http://stackoverflow.com/questions/19520280/how-do-you-tell-in-firebug-what-url-is-throwing-a-404-not-found-error-in-the-net
(In reply to Jan Honza Odvarko [:Honza] from comment #2) > Link to proper Firebug bug: > http://code.google.com/p/fbug/issues/detail?id=1772 For reference, the Firebug issue is now located at https://github.com/firebug/firebug/issues/1911. FWIW, and this question pops up every now and then. Here's another Stack Overflow question related to this: http://stackoverflow.com/q/24957437/432681 So I think this feature would help many people to debug their sources. (In reply to Boris Zbarsky [:bz] from comment #1) > All that said, this could be used as a tracking bug for adding such aContext > arguments; specific bugs would need to be filed on every place that starts a > network load to pass a useful context. To make progress, I'll start filing those bugs. Sebastian
Depends on: 1230878
Depends on: 1230899
Depends on: 1230904
Summary: Origin of a network (HTTP) request → Add API for origin of a network (HTTP) request
Whiteboard: [firebug-p3] → [firebug-p3][necko-would-take]
No longer blocks: netmonitor-initiator
See Also: → netmonitor-initiator
Priority: -- → P5

Is this Bug still relevant or can it be closed by now?

Flags: needinfo?(odvarko)
Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(odvarko)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: