From the course: Developing for Web Performance

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Optimizing self-hosted web font delivery

Optimizing self-hosted web font delivery

From the course: Developing for Web Performance

Optimizing self-hosted web font delivery

- [Instructor] The most significant performance hit you get from using a third-party web font is that it's coming from a third party and requires a separate connection. That means self-hosting your web fonts eliminates this problem which gives you an automatic performance boost. So this is what you should always try to do, self-host your fonts. When you self-host your web fonts, you can take advantage of a whole range of performance optimization we've already talked about including pre-loading the font style sheets or even in-lining them in critical CSS and setting font display swap as a standard. You can also further control how the web fonts are loaded using JavaScript and hooking into the browser's font loading API, though this is still experimental technology. So your mileage will vary as they say. The cool thing is most open web fonts that you find on services like Google fonts are also available for downloads.…

Contents