When using fonts in Bootstrap, is it quicker to use the Google Fonts API or to just install the font file on the server?

Normally UX designer, I’m currently also product manager for a range of web tools but my dev skills aren’t very strong at all, so forgive me if this is a silly question. We’re building a range of Bootstrap pages for a set of corporate tools, and at the moment we’re using the Google Fonts API for our fonts. I’m a bit worried about load-time, and we think it may be Google Fonts gathering data. Before we unpick our current designs and install the font files on the server, I was wondering if anyone else noticed any load time when using Google Fonts and whether uploading the fonts themselves was a solution – or whether that’s just going to make it even worse?

Answer

Short answer: Google is much faster than you hosting it yourself.

Long Answer: Putting it on your own server might seem like a good idea to improve load times. After all, the files are closer to your webpage.
But, no. After all, when a user goes to your website, initially they just get some HTML. Here we have references to other files: Images, JS, CSS, and, in your case, Fonts.

For each of these external resources, the client will make a new call to the webserver where the file location is provided. So wether you host files yourself or reference google, the call to that resource will happen at the same time.

However, unless you are an exceptional company, googles server wil respond much faster. It will also use googles bandwith, rather than yours, saving you (maybe, a little bit) of money on that.

Attribution
Source : Link , Question Author : caztec , Answer Author : Kjeld Schmidt

Leave a Comment