Detect non WOFF2 fonts and estimate gain

This commit is contained in:
Gaël Métais
2020-12-21 01:18:56 +01:00
parent dd0c17a9d4
commit d93af3d6e4
7 changed files with 170 additions and 13 deletions
+10
View File
@@ -927,6 +927,16 @@ var policies = {
return offenders;
}
},*/
"nonWoff2Fonts": {
"tool": "redownload",
"label": "Woff 2",
"message": "<p>The fonts listed here could be lighter if they were served with the latest woff 2 font file format. Some online tools can help you easily convert older formats to woff 2.</p>",
"isOkThreshold": 0,
"isBadThreshold": 61440,
"isAbnormalThreshold": 122880,
"hasOffenders": true,
"unit": 'bytes'
},
"oldHttpProtocol": {
"label": "HTTP/1 requests",
"message": "<p>HTTP/2 is the latest version of the HTTP protocol. It is designed to optimize load speed. HTTP/3 will come soon and should be even faster!</p><p>When a domain sends more than 4 requests over HTTP/1, this metric counts one point for each new request. Below 5 requests, the benefits of HTTP/2 are generally less significant.</p>",
+3 -1
View File
@@ -87,7 +87,9 @@
"label": "Web fonts",
"policies": {
"fontsCount": 1,
"heavyFonts": 1
"heavyFonts": 0.5,
//"unusedUnicodeRanges": 0.5,
"nonWoff2Fonts": 0.5
}
},
"serverConfig": {