-
Notifications
You must be signed in to change notification settings - Fork 50
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
Capture redirect before page #89
Capture redirect before page #89
Conversation
Hi @mikedijkstra thank you for the PR! I'll have a look later today. |
Attaching what the log looks like for me: chromePerflog-1.json.gz |
@soulgalore Interesting! You can see the log I generated for this PR here. My logs don't start with |
Ah sorry I missed the JSON. And good catch that the Is there a way you can start your trace earlier so you get the those event too? Thinking maybe the trace start to late? |
@soulgalore The DevTools logs I'm pulling come from Lighthouse. I've had a dig through how it works and the simplified flow is: Start the browser, load This results in I can "trick" it into working by starting the recording before Do you know the command that is called in the Browsertime implementation? I'd be interested to know why I don't see the |
@mikedijkstra When I did a quick check it looked like we turn on the tracing just before we start the navigation (but we navigate with JavaScript not the navigate CPD command) and not when we access our internal start page, but could be that did read that wrong, let me have a deeper look tomorrow. |
Lets merge this, to me it doesn't really matter but just curious why we have different logs. |
This PR updates the case where a page is first added to populate any redirects that occurred before the
page
is created.This will allow for a more accurate measurement of TTFB: (source: Stackoverflow answer)
And also make the HAR more closely aligned with that generated by Chrome.
Here's a comparison of navigating to "https://google.com" (which redirects to "https://www.google.com"):
chrome-har HAR before change
Chrome HAR
chrome-har HAR after change