Open Bug 1777193 Opened 2 years ago Updated 2 years ago

False positive for “unused preload warning”

Categories

(Core :: Layout: Text and Fonts, defect)

Firefox 102
defect

Tracking

()

UNCONFIRMED

People

(Reporter: timwolla, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0

Steps to reproduce:

  1. Open https://www.woltlab.com/community/
  2. Open the console.

Actual results:

I see:

The resource at “https://www.woltlab.com/font/fontawesome-webfont.woff2?v=4.7.0” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly.

In the logs.

Expected results:

I did not expect to see the message, because I believe that preloading is correctly configured. The font in question is referenced in https://www.woltlab.com/style/style-6.css and I believe the preloading attributes are correct with regard to the usage of the font in question.

The message is not logged for all requests. It looks like the warning only appears if the CSS file comes from the cache.

Bug report within our tracker (German): https://www.woltlab.com/community/thread/295929-fehlermeldung-in-der-browserkonsole-vom-firefox/
Stack Overflow question that appears to be related: https://stackoverflow.com/q/66559704/782822

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Layout: Text and Fonts
Product: Firefox → Core

The preloader probably isn't aware of our webfont cache. I guess that what might be happening is that we see the <link rel=preload> for the font resource, and so we start loading it (or find it in the network cache); but then we don't end up using it because we have the font already in the webfont cache, and so this warning is triggered.

Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.