-
Notifications
You must be signed in to change notification settings - Fork 426
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
TTFB (under)reporting 0ms on Safari + utm/gclid params #275
Comments
Thanks for the report. I couldn't repro this myself using any of those query params, so I don't think the issue actually has anything to do with query params; also it looks like even in your data the Given the types of param that you're seeing the issue with, I suspected it had something to do with how those visitors are arriving at your site and not what the final URL shows. Also, given that these are all marketing params, that lead me to believe the root cause might be an issue with cross-origin redirects, and when I tested a page I know has a cross-origin redirect, I was able to reproduce the issue (not with the web-vitals JS library, but with the web API itself in Safari). Here are the steps I did to repro:
performance.getEntriesByType('navigation')[0].responseStart; // 0 I'm not sure if this is a bug or intentional, but it looks like Safari reports 0 for most values in the Navigation Timing API if there was a cross-origin redirect. How do you think the web-vitals library should handle these cases? Should we not report TTFB at all for pages with cross-origin redirects in Safari? I know that's not great, but I think it would be better than reporting 0. WDYT? |
Ah, I should've moved forward/shared my initial and only theory then, as that was what I shared during the perf.now helpdesk session 🙈 I would be inclined to go with "not report TTFB" as well, as percentiles would otherwise be massively skewed. |
@philipwalton what are we doing for bfcache and prerender? If filtering out 0 TTFB then will filter those too presumably? Or do we report the actual TTFB there? |
To clarify, I don't think we should filter out 0 TTFB values, I think we should filter out visits where the
For bfcache we're just reporting 0 (and not looking at the |
I talked with Barry (tunetheweb) during performance.now conference help desk about the TTFB reporting 0ms under these conditions.
This can be seen in the following attachments as well, showing RUM data (I've got more domains if needed).
mobile P80 data of the last 7 days @ [redacted] (soon to be replatformed, date unknown)
mobile P80 data of the last 28 days @ [redacted]:
As we started using the attribution build recently, I'm able to say that this happens both with and without the attribution build (both classic script).
Safari at the top, Google Chrome at the bottom. So:
The text was updated successfully, but these errors were encountered: