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

link rel=preload warning, but link exists #6417

Closed
liorg2 opened this issue Oct 28, 2018 · 4 comments
Closed

link rel=preload warning, but link exists #6417

liorg2 opened this issue Oct 28, 2018 · 4 comments
Assignees
Labels

Comments

@liorg2
Copy link

liorg2 commented Oct 28, 2018

i get link rel=preload warning, but link exists in the head section
can you please assist ?

report is attached

analyzed page: https://www.terminalx.com/
version: Lighthouse 3.0.3
generated with chrome developers tools > audit
chrome version: Version 70.0.3538.67 (Official Build) (64-bit)
REPORT:

image

source
image

full json
www.terminalx.com-20181028T100755.json.zip

@midzer
Copy link
Contributor

midzer commented Oct 28, 2018

Hi @liorg2
Thanks for your report. Without running LH on your site, I got two (possible relevant) warnings in console:

The resource was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.

A preload for '' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.

Consider running a more recent LH version as well. If i remember correctly, there has been some changes concerning rel=preload lately.

Have a nice day
midzer

@paulirish
Copy link
Member

We need to do #6694 but for the preload audit.

The link rel=preload directive should have crossorigin in them.
https://www.zachleat.com/web/preload/

@patrickhulce
Copy link
Collaborator

patrickhulce commented Dec 19, 2018

I'm not able to reproduce this specific error, but I've found some interesting things in my investigation.

  1. The initiators don't seem to be tracked properly on latest Chrome Canary (Fonts initiator is not properly attributed to stylesheet #6843). Fonts loaded through a stylesheet show up as being initiated by the root document. This effectively means we shouldn't be able to encounter this case at the moment since all fonts that need crossorigin won't be suggested for preload anyway due to an incorrect depth.
  2. Our audit skips URLs that are already preloaded instead of network request IDs which means I'm actually seeing the opposite occur if I force the issue with a script instead. i.e. when a URL is requested to be preloaded and it isn't being used (so the request is issued a second time) the audit still passes, even though it's double bad for performance!

It's difficult to take action on 2, without taking action on 1. I'll try and track down the last Chrome version where it worked. Update in #6843 but no obvious next steps on 1, so just addressing 2 in #6849

@patrickhulce
Copy link
Collaborator

Marking this as closed, #6849 addresses what we can right now and #6843 tracks the remainder.

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

No branches or pull requests

5 participants
@paulirish @liorg2 @patrickhulce @midzer and others