-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to build page resources dependency tree by initiator ? #9
Comments
Related thread / info on upstream blocker: puppeteer/puppeteer#1395 |
@andrewsezko In case it helps, here's a quick snippet I wrote using pptr CDP to access devtools directly and get the initiator info for a similar requirement:
getInitiatorUrl is a little recursive function to search the initiator callstack for the info I need, not included because it's too specific to my requirements. You could look at the object dumps for initiator to write your own. |
Lighthouse does most of this work for you. I wonder if you could modify the critical request chain audit slightly to include everything rather than just critical requests? |
@ebidel I honestly haven't looked at Lighthouse very much as I navigated here from puppeteer/devtools searches. I'll take a look there as well, thanks for the suggestion. |
Hi, I am really excited about the puppeteer, you have done really great tool. I am using it from v0.11.0.
I am wondering if it possible to build the page resources dependency tree by their initiators.
For example, to visualize what amount of calls are sent by 3-d party tracking or analytics libs.
Such functionality has Lighthouse (critical request chains in performance audit results) but I need the whole picture.
It would be great if some of you guys could share your thoughts or advice how it could be done with the puppeteer.
As I understood, all information I need could be found in the trace of the page, but maybe there is a better solution than parsing that big and scary JSON file.
The text was updated successfully, but these errors were encountered: