• Resolved phloo

    (@phloo)


    Hi. Currently using the latest FVM version and trying to get the best out of the Google Fonts loading.

    https://csswizardry.com/2020/05/the-fastest-google-fonts/

    This part includes the following code

    
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link rel="preload" as="style" href="$fontlink" />
    <link rel="stylesheet" href="$fontlink" media="print" onload="this.media='all'" />
    <noscript>
      <link rel="stylesheet" href="$fontlink" />
    </noscript>
    

    $fontlink is something like https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&family=Lato:wght@400;600&display=swap

    When using FVM the first link (preconnect) gets removed completely.
    So does the third one with the onload trick.

    How can I tell FVM to exclude this code because it’s proven the fastest way (see the first link)?

    Thanks in advance

Viewing 16 replies (of 16 total)
Viewing 16 replies (of 16 total)
  • The topic ‘How to stop removing preconnect & onload switching?’ is closed to new replies.