Hello Everyone,
I'm new to Firefox development, and really what I'm looking for is documentation to look at/where to start in regards to the problem below:
I'm writing a firefox plugin, and what I'm trying to figure out is how to get a set of all requests that are triggered due to the first GET request.
An example would be when one to a site like www.cnn.com, we issue a GET request, based on this, a html page is returned with links to a whole bunch of images and other content which trigger more GET requests.
So I'm trying to build a tree of all these requests, ie
cnn.com
- some image
- some image
- flash item
- java item
- some other thing...
Where cnn.com is the root and the first GET request, and the bulleted items are triggered from cnn.com
I've registered handlers to take note of when these elements arrive in the browser but how do I link them together to the root which is the first GET request a user makes is my real question.
Again, just pointing me to documentation/where to start would be massively helpful.
cheers
EDIT:
From durilai's suggestion below, Firebug has a feature that does something like the above. Looking at a bunch of Request headers generated from a root GET, I've also noticed that they have the Referrer header.
- A quick Google reveals this wikipedia link: HTTP_referrer
- Here's the ITEF RFC Section for it: HTTP 1.1 rfc2616
- And here's a Mozillazine article, which may be outdated: Network.http.sendRefererHeader
I guess I'll be going down the above rabbit hole unless anyone comes up with a better way. :P