F
F
Fedor2016-10-24 12:01:53
css
Fedor, 2016-10-24 12:01:53

What is better, download fonts to your hosting or use cdn google?

Which is better in terms of performance?
Use inserts like

<link href='http://fonts.googleapis.com/css?    family=Fira+Sans:300,400,500,700,300italic,400italic,500italic,700italic&subset=latin,cyrillic' rel='stylesheet' type='text/css'>

Or upload to your hosting and download fonts from it?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
S
Sergey Goryachev, 2016-10-24
@purplesky

There will be a lot of opinions and it’s hard to say which one is really correct.
I chose the option for myself - to load myself for two main reasons.
First, I optimize fonts differently. As a rule, much fewer characters are required than are embedded in the CDN.
Secondly, do not depend on other sites. What if the googlefont falls?))) Well, or a bad connection to the CDN.
My version is more time consuming. Download, optimize, upload, connect.
I don't use CDN at all ( rocks will be thrown at me now ), but I think it's the right thing to do.

B
bnytiki, 2016-10-24
@bnytiki

Even 3 years ago, I would say - use Google, it can be faster for the user.
But due to a bunch of things that happened (for example, in a big DDoS attack on the Dyn DNS servers that happened a few days ago and as a result of which even github.com was unavailable) - put everything to yourself.
After all, you may not even know otherwise that some of your users do not have access to some of the files necessary for the normal display of the site.

A
Artemy Zaitsev, 2016-10-24
@arzai

Google doesn't work in China and Google CDN doesn't work in China.
Russian users who go to China will not be able to use the site:
https://habrahabr.ru/sandbox/101173/

I
iBird Rose, 2016-10-24
@iiiBird

if the fonts are in google, then why be sophisticated and load them yourself? You can load fonts that Google Fonts does not have. Googlefonts was created for this, so that people do not suffer with inserting fonts manually.

D
dom1n1k, 2016-10-24
@dom1n1k

In most cases, GF is preferable for almost all factors except for one - data leakage. If you do not want Google to collect statistics on you and visitors, you need to go to yourself.
But there are exception situations. For example, the Lato font on GF does not contain Cyrillic, although the Cyrillic version has been on the authors' site for a long time. But for some reason, GF has not yet updated its own, and it is not known when it will be born.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question