Skip to content

Commit 7597735

Browse files
authored
Loads font-awesome asynchronously (#2967)
Loading font-awesome asynchronously allows to display the site faster. This change is advised by google pagespeed insights
1 parent 184f4f3 commit 7597735

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

_includes/head.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
<!-- For all browsers -->
1717
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
18-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css">
18+
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
19+
<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css"></noscript>
1920

2021
<!--[if IE]>
2122
<style>
@@ -36,4 +37,4 @@
3637
{% for script in site.head_scripts %}
3738
<script src="{{ script | relative_url }}"></script>
3839
{% endfor %}
39-
{% endif %}
40+
{% endif %}

0 commit comments

Comments
 (0)