Skip to content
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

Fonts initiator is not properly attributed to stylesheet #6843

Open
patrickhulce opened this issue Dec 19, 2018 · 3 comments
Open

Fonts initiator is not properly attributed to stylesheet #6843

patrickhulce opened this issue Dec 19, 2018 · 3 comments

Comments

@patrickhulce
Copy link
Collaborator

patrickhulce commented Dec 19, 2018

Provide the steps to reproduce

  1. Run LH on http://localhost:10200/preload.html

What is the current behavior?

In "Critical Request Chains" audit, observe that the font /perf/lobster-v20-latin-regular.woff2 is not nested underneath the /perf/preload_style.css file that initiates it.

What is the expected behavior?

The font /perf/lobster-v20-latin-regular.woff2 is nested underneath the /perf/preload_style.css file that initiates it.

This has significant consequences for Lantern accuracy as well.

Environment Information

  • Affected Channels: CLI
  • Lighthouse version: 4.0.0-beta

Related issues
#6417

@patrickhulce
Copy link
Collaborator Author

I'll try and track down the last Chrome version where it worked.

It never did? 😕I went as far back as m61 (~mid 2017), but I couldn't get the stylesheet to show up as the initiator in DevTools. I'm convinced this used to work though, or there's no way we could've been recommending slick.woff in the first place for the parent bug to have been filed (#6417)!

In our smoke test page, the initiator gets falsely attributed to the line of the document that adds the script tag and if you comment that line out, the initiator just drops to Other

@paulirish
Copy link
Member

paulirish commented Dec 20, 2018

The other piece here is that if script is forcing a reflow, then the initiator will point to that, rather than the stylesheet reference of that font. But if a style recalc was done async (not forced) then the initiator should be correct.

All that said, there are some places where the initiator data is wrong, so it could be that case, as well. https://bugs.chromium.org/p/chromium/issues/detail?id=570298

@andydavies
Copy link

I think you might be looking for this issue - https://bugs.chromium.org/p/chromium/issues/detail?id=570298

There's another issue related to aligning the initiator with Resource Timing definition that's marked as won't fix too - https://bugs.chromium.org/p/chromium/issues/detail?id=599648

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment