spacelephant / spacelephant.github.io

Space Elephant corporate web site V1
Other
6 stars 2 forks source link

Enhance performances of font loading #20

Closed dlecan closed 6 years ago

dlecan commented 6 years ago

Fonts loading is the slowest part of the spacelephant.org page.

This issue to track enhancements.

Example of performance analysis: https://www.webpagetest.org/result/180411_YM_f1a3bdfabc6874065c058791d4a33ddd/

dlecan commented 6 years ago

Get Google font configuration: https://fontcdn.org/

dlecan commented 6 years ago

Loading page time will fall from 3.8s to 2.8s by using Google Font CDN.

Before: https://www.webpagetest.org/result/180411_YM_f1a3bdfabc6874065c058791d4a33ddd/

After: https://www.webpagetest.org/result/180412_PJ_12fcebdb28087f401d8d153bed38def3/

Step to implement:

<link rel='dns-prefetch' href='//use.fontawesome.com' />
<link rel='dns-prefetch' href='//fonts.gstatic.com' />
<link rel='dns-prefetch' href='//fonts.googleapis.com' />
<link href='https://fonts.googleapis.com/css?family=Poppins:300,400,500,600&subset=latin' rel='stylesheet' type='text/css'>
dlecan commented 6 years ago

1.8s after optimizations! https://www.webpagetest.org/result/180416_GG_9d6edb735e9e7e70095044940c31abe6/