Progressive Web Apps with Angular by Majid Hajian
Author:Majid Hajian
Language: eng
Format: epub
ISBN: 9781484244487
Publisher: Apress
Optimize Fonts
It’s very likely that you are using fonts in web applications these days, especially external fonts such as Google fonts. While we add the style link to the head of the page, it should be taken into consideration that these fonts will block rendering. That means rendering will hold off until these styles are downloaded and rendered. It is important to slim down the initial need for fonts and load the reset of them on demand.
Self-Hosting Fonts
Using a web font face block means that the browser decides what to do if it takes a long time for that web font to fetch. Some browsers will wait anywhere up to three seconds for this before falling back to a system font, and they'll eventually swap it out to the font once it's downloaded.
We are trying to avoid invisible text, so thanks to new feature called font-display, this helps to decide how web fonts will render or fall back based on how long it takes for them to swap.
Swap gives the font face a zero-second block period and an infinite swap period. In other words, the browser will render text pretty quickly with a fallback font if downloading takes time. Once the web font is ready, it is going to swap. This feature has a good browser support.1@font-face {
font-family: YouFont;
font-style: normal;
font-display: swap;
font-weight: 400;
src: local(yo-font Regular'), local(YouFont -Regular'),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url(you-font -v12-latin-regular.woff2') format('woff2'),
/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
url(you-font -v12-latin-regular.woff') format('woff');
}
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Fifty Quick Ideas to Improve Your Tests by Gojko Adzic David Evans and Tom Roden(844)
Hands-On RESTful Web Services with ASP.NET Core 3 by Samuele Resca(703)
CSS 3 Visual Learning Guide: a comprehensive example set for getting up to speed fast by Ludo Mike(529)
PHP 7 Solutions by David Powers(434)
React js: The Ultimate Beginner's Guide to Learn React js Programming Step by Step - 2020 by Peterson Kathleen(427)
Getting Started with the Internet of Things by Pfister Cuno(383)
Beginning Git and GitHub by Mariot Tsitoara(379)
HTML 5 Visual Learning Guide: a comprehensive example set for getting up to speed fast by Ludo Mike(365)
Getting a Coding Job For Dummies by Nikhil Abraham(363)
Programming PHP by Kevin Tatroe Peter MacIntyre & Rasmus Lerdorf(322)
Magento 2 Development Cookbook by Bart Delvaux(321)
Programming PHP by Kevin Tatroe(303)
Creating Data-Driven Web Sites by Bob Terrell(302)
Full Stack Serverless by Nader Dabit(295)
Manifesto Comunista by Friedrich Engels(294)
Getting Started with OAuth 2.0 by Boyd Ryan(290)
Practical Oracle JET by Daniel Curtis(290)
gRPC by Kasun Indrasiri(278)
Building Web Applications with Erlang by Zachary Kessin(274)
