1) I get notified for everything the page does - all the scripts, all
the icons, etc. How can I tell which request is for just the top
window (the one that shows up in a tab)?
2) Sometimes I don't get the matching "http-on-examine-response",
which seems odd. Is there another observer I can install during the
"http-on-modify-request" that will definitely let me know when the
http request/response is done?
Thanks!
Chris
1) You should check channel.flags
for any documents: LOAD_DOCUMENT_URI
for top level documents: LOAD_INITIAL_DOCUMENT_URI
something like this
if (channel.flags & nsIChannel.LOAD_INITIAL_DOCUMENT_URI) {
...
}
2) You also should install "http-on-examine-cached-response" observer.
Brilliant - thanks!