Question

I don't think this is true, but I have been told when the font is loaded using the GoogleApi the font is loaded on all pages, regardless if it is actually used. I was under the assumption that the font is only loaded on pages that the @font-face is called.

Can someone please help me understand the download and latency concerns associated with a webfont placed within a global header... Is it true the font is downloaded each rime a page is requested and served up even if the @font-face tag isn't requested on a specific page, or if the font has already been loaded? is the web font cached similar to images and then requested again from the users machine as needed?

Was it helpful?

Solution

It's not totally clear what you're asking, however:

Any font you include in @font-face on a page will be loaded on that page. This only isn't the case where your user already has the font cached in their browser (in which case the browser will revert to the cached version rather than downloading the file).

If the @font-face isn't included in the page, then it won't load.

The key difference here is if you include @font-face in a separate CSS file, in which case the font will load for every page that loads that CSS file (regardless of whether the font itself is referenced on that specific page).

Hopefully that helps?

OTHER TIPS

It is requested only where you specified that.
If you use a common header, where the <link> to google font is called, yes, it will be requested on each page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top