Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
Add cross-origin to font preload, to prevent doulble loading.
Browse files Browse the repository at this point in the history
Why? Well… That’s a long story.
A good summary can be found here: w3c/preload#32 (comment)
  • Loading branch information
fatpixelstudio committed Jan 17, 2017
1 parent 3103b48 commit 4846ace
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion site/snippets/html-head.desktop.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<link rel="dns-prefetch" href="https://www.google-analytics.com">

<?php // Preload assets (fonts, stylesheets, etc.) ?>
<link rel="preload" href="<?php $site->url(); ?>/assets/fonts/firasans/firasans-bold.woff2" as="font" type="font/woff2">
<link rel="preload" href="<?php $site->url(); ?>/assets/fonts/firasans/firasans-bold.woff2" as="font" type="font/woff2" crossorigin>

<?php // Page title and (meta) description ?>
<?php snippet('page-title-description') ?>
Expand Down
2 changes: 1 addition & 1 deletion site/snippets/html-head.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<link rel="dns-prefetch" href="https://www.google-analytics.com">

<?php // Preload assets (fonts, stylesheets, etc.) ?>
<link rel="preload" href="<?php $site->url(); ?>/assets/fonts/firasans/firasans-bold.woff2" as="font" type="font/woff2">
<link rel="preload" href="<?php $site->url(); ?>/assets/fonts/firasans/firasans-bold.woff2" as="font" type="font/woff2" crossorigin>

<?php // Page title and (meta) description ?>
<?php snippet('page-title-description') ?>
Expand Down

0 comments on commit 4846ace

Please sign in to comment.