Current time: 11-16-2018, 01:05 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
preload font
08-30-2018, 04:20 PM
Post: #1
preload font
hi

I order to improve my perf i decide to preload my font.
Code:
<link rel="preload" href="https://www.mydomain.com/font/specialelite.woff2" as="font" type="font/woff2" media="screen and (min-width: 624px)"

But in consol I got the following message
Code:
The resource https://www.mydomain.com/font/specialelite.woff2 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.

But this font is used? So, is there anyone who can explain me my mistake?
Find all posts by this user
Quote this message in a reply
09-04-2018, 08:13 PM
Post: #2
RE: preload font
Add the crossorigin attribute i.e.

<link rel="preload" href="https://www.mydomain.com/font/specialelite.woff2" as="font" type="font/woff2" crossorigin>

Andy

Using WebPageTest - http://usingwpt.com/
Visit this user's website Find all posts by this user
Quote this message in a reply
09-04-2018, 08:29 PM
Post: #3
RE: preload font
@andydavies

Thanks for you help, but this doesn't change anything and I'm not surprise as i load font from my own domain.
Find all posts by this user
Quote this message in a reply
09-05-2018, 10:07 PM
Post: #4
RE: preload font
Do you have a link to the page in question?

Andy

Using WebPageTest - http://usingwpt.com/
Visit this user's website Find all posts by this user
Quote this message in a reply
09-05-2018, 10:15 PM
Post: #5
RE: preload font
Thanks a lot I sent you by PM
Find all posts by this user
Quote this message in a reply
11-05-2018, 04:34 AM
Post: #6
RE: preload font
This might be something you've already done, but try disabling the media query (to simplify testing as much as possible) and double check the font you're loading is being downloaded by the current page in the network tab. Document/CSS parsers in browsers will speculate whether they should load a web font by examining the text content on a page and the styles applied to it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)