Fonts using font-display always timeouts, even when they are taken from browser's cache
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
People
(Reporter: oscarcala, Unassigned)
Details
Attachments
(6 files)
Reporter | ||
Comment 2•7 years ago
|
||
Reporter | ||
Comment 3•7 years ago
|
||
Reporter | ||
Comment 4•7 years ago
|
||
Reporter | ||
Comment 5•7 years ago
|
||
Reporter | ||
Comment 6•7 years ago
|
||
Reporter | ||
Comment 7•7 years ago
|
||
Reporter | ||
Comment 8•7 years ago
|
||
Reporter | ||
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
Reporter | ||
Comment 12•7 years ago
|
||
Comment 13•7 years ago
|
||
Comment 14•7 years ago
|
||
Comment 15•7 years ago
|
||
![]() |
||
Comment 16•7 years ago
|
||
Reporter | ||
Comment 17•7 years ago
|
||
Hi everybody, I'm getting back to this issue.
After some months, the behavior continues the same in our implementation. I would like to know if there is a way to help to resolve this. I think the reproduction steps are not far from the general use case, so I'm wondering if there is something specific I'm doing that makes this work out of the expectations. Or, if definetelly there is a defect in the behavior and this can be considered a compliance issue that may be we can report in canisue.com.
Would this be something in my localhost server? Let say it is. But this doesn't work anyways in our production environments and we have such a good infrastructure that serves more than 8M pageviews per day with very low latency, CDN (akamai), 64+ servers, loadbalancing and other optimizations in the middle. So, if it doesn't work in a production environment like this, would this work for other people that might have less infrastructure?
If you navigate to the page (link click, bookmark click, going directly), then the resource, according the info provided - specifically max-age, should come from the cache w/o a round trip to the server and likely make it in 200ms.
Specifically this is not happening.
I will try Cache-control: immutable
, this week, but I'm wondering if I'm the only one seeing this issue, or how do people in general handle font-display:optional in recent versions of firefox (This works according to the expectations in Chrome).
Comment 18•6 years ago
|
||
but I'm wondering if I'm the only one seeing this issue
You're not the only one, it's an issue on https://warwick.ac.uk/study too (see element div.text
) too. We've discussed the idea of a Link header to try and preload the fonts but not tried it.
Did you get anywhere with Cache-control: immutable
, Oscar?
Comment 19•6 years ago
|
||
Oh, and I can reproduce this in 70.0a1 (2019-08-29) (64-bit) nightly - it should probably be set to NEW, no?
Comment 20•5 years ago
|
||
Hi,
I found this bug whilst working on some web font issues reported on a couple of our websites under Firefox after we switched to font-display: optional
.
After quite a bit of tinkering here is what we have found has improved the situation for us:
- Ensuring that
immutable
is added to theCache-Control
header of your font. We were setting this against our S3 bucket but our CDN was removing it, so it is worth double checking. - Ensuring that there is a
<link rel="preload"/>
for every font that could be used on the page. For us this meant preloading all variants of our font as our fonts are loaded centrally and used by many sub-sites that we have limited control over.
An example of one of our font preloads:
<link rel="preload" href="https://nav.files.bbci.co.uk/orbit/ece9cb048f668bbc4cc6214737a6cdb6/font/BBCReithSans_W_Rg.woff2" as="font" type="font/woff2" crossorigin="">
I found this SmashingMagazine article useful for understanding what rel=preload
is and roughly how it works https://www.smashingmagazine.com/2016/02/preload-what-is-it-good-for/.
The above steps have made web fonts on Firefox work quite well for websites that use a small number of web fonts. Unfortunately sites that use quite a few variants of our font are still encountering issues; see https://www.bbc.com/culture/article/20201112-the-eye-of-providence-the-symbol-with-a-secret-meaning as an example.
For me and my colleagues the header font loads like so:
But it should look like so:
Many other fonts on this page do load correctly, but the header font consistently has issues. I would greatly appreciate any advice folks have to see how we can improve this situation.
Comment 21•5 years ago
|
||
Comment 22•5 years ago
|
||
Comment 23•5 years ago
|
||
Apologies I incorrectly uploaded images in my previous comment. I have attached the correct and incorrect font images to this issue.
Updated•3 years ago
|
Description
•