Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to determine if a request was preloaded ? #93

Open
ghisleouf opened this issue Jan 20, 2022 · 6 comments
Open

How to determine if a request was preloaded ? #93

ghisleouf opened this issue Jan 20, 2022 · 6 comments

Comments

@ghisleouf
Copy link

Hi guys,

First of all, thanks for your amazing work! That's huge !

I would like to determine from HAR generated file which request was preloaded (or not) during page loading.
Is there a way to determine it easily ?

Thanks for your help.

Best.

@soulgalore
Copy link
Member

Hi @ghisleouf thanks for the kind words! HAR doesn't support that but we could maybe add it is a extra field. I briefly looked into the trace log where there's preloading (I tried with shopify.com) and there's a request field "isLinkPreload": true that maybe means that it is preloaded? If so, we could add it. Can you help me find out more if that's what it means?

Best

@ghisleouf
Copy link
Author

Hi @soulgalore !

That's exactly what I'm looking for !
This is this exact field.

I'm quite new to HAR world :)

Actually, I working on a HAR viewer where trace log comes from Lighthouse CLI report.
I compared HAR with another one coming from another SaaS service and I would like to understand the way to add field and mimic some interesting data that they have.

That would be definitely awesome to have it.

Thanks for your help.

@soulgalore
Copy link
Member

Hi @ghisleouf wanted to check if you know about https://github.com/micmro/PerfCascade?

I can add that field sometimes early next week, or do you have time to do a PR?

@ghisleouf
Copy link
Author

ghisleouf commented Jan 21, 2022

Yes !
I know this viewer, thanks for sharing.
Unfortunately, I'm a little bit busy these days ( moving my new house, and working no it)...
so, it would be perfect if you could add it on your side, even if I have to wait 😄 !

Thank you so much !

@soulgalore
Copy link
Member

I added a PR that just copies it to _isLinkPreload on the request.

Is it anything special that stops you for using PerfCascade? Michael is always open to PRs and adding functionality.

@ghisleouf
Copy link
Author

Thank you so much for the update @soulgalore !
For PerfCascade, I cannot use it because I need a totally custom display on my side and data is driven by a PHP application and Stimulus library (the main reason is PHP and Twig templating, and design that I have to respect).

Thanks a lot for your help again.
Can't wait for the release :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants