FontAwesome not warned PageSpeed ​​Insights

Insert the font-awesome.min.css in the usual way that is still used by most web pages, as it does not affect the page load time. However, when you use the PageSpeed ​​Insights page, your site will be warned with an error. And to remove the error, it is best to replace the font-awesome.min.css link by inserting the direct css of the font.

Directly insert FontAwesome in Blog

Method 1: Insert the tag    <b:skin></b:skin>

<b:skin ><![CDATA[

/* FontAwesome */
.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;}


Method 2: Insert directly in <style type='text/css'></style>

<style type='text/css'>@font-face{font-family:FontAwesome;src:url(//;src:url(//;v=4.7.0)format(&#39;embedded-opentype&#39;),url(//;woff2&#39;),url(//;woff&#39;),url(//;truetype&#39;),url(//;svg&#39;);font-weight:400;font-style:normal}
.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;}</style>

Method 3: Insert directly in <style type='text/css'></style> nhưng có sử dụng /* <![CDATA[ */

<style type='text/css'>/* <![CDATA[ */
.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;}
/* ]]> */</style>

With this insertion, you also do the same with the Material Icon, for example:

<b:skin ><![CDATA[

/* Material Icon */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: local('Material Icons'), local('MaterialIcons-Regular'), url(// format('woff'), url(// format('woff2'), url(// format('truetype');
.material-icons {font-family: 'Material Icons';font-weight:normal;font-style:normal;font-size:inherit;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;vertical-align:middle;
/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;
/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;
/* Support for IE. */
font-feature-settings: 'liga';

About My name is Nguyen Manh Cuong. I was born in a poor village in Ba Vi district, HA NOI province - windy and sunny land. Currently. Mr Cuong.
Newer Posts Newer Posts Older Posts Older Posts


Post a Comment
Please enable JavaScript!