Support » Theme: GeneratePress » Preload styles

  • Tony Franco

    (@tony-franco)


    Dear Sirs,

    Please, i´m trying to apply preload for styles as web.dev improvements for eliminating render-blocking resources.

    I have selected all the critical css and added inline at head, and for the css files i´m trying to add preload at head as below:

    <link rel="preload" href="/wp-content/themes/generatepress/assets/css/main.min.css?ver=3.1.0" as="style" onload="this.rel='stylesheet'">
    <noscript><link rel="stylesheet" href="/wp-content/themes/generatepress/assets/css/main.min.css?ver=3.1.0"></noscript>

    After this, style breaks.. (desktop and mobile)

    What im doing wrong? do you have some tips?

    Thanks and Regards,
    Tony

Viewing 2 replies - 1 through 2 (of 2 total)
  • David

    (@diggeddy)

    Hi there,

    i am not sure what the issue is – if you can share a link to the site, then i can take a look at whats going on.

    Thread Starter Tony Franco

    (@tony-franco)

    Hi David,

    Thank you by your return and sorry by disturb.

    Please, take a look at images:


    Desktop without css preload: https://ibb.co/25xycMN

    Desktop with css preload: https://ibb.co/mJFH7MY

    Font is different…


    Mobile without css preload: https://ibb.co/MMqMH5s

    Mobile with css preload: https://ibb.co/tYkYknj

    Font is different, changed the image size and header is different also…

    To extract the critical css i have used this chrome extension: https://chrome.google.com/webstore/detail/critical-css-extractor/pfcjlollanbphpceofgibjopkkppbdmc

    The code at head for the preload:

    <link rel="preload" href="https://www.eter7.com/wp-content/themes/generatepress/assets/css/main.min.css?ver=3.1.0" as="style" onload="this.onload=null;this.rel='stylesheet'">
    <noscript><link rel="stylesheet" href="https://www.eter7.com/wp-content/themes/generatepress/assets/css/main.min.css?ver=3.1.0"></noscript>
    
    <link rel="preload" href="https://www.eter7.com/wp-includes/css/dist/block-library/style.min.css?ver=5.8.2" as="style" onload="this.onload=null;this.rel='stylesheet'">
    <noscript><link rel="stylesheet" href="https://www.eter7.com/wp-includes/css/dist/block-library/style.min.css?ver=5.8.2"></noscript>
    
    <link rel="preload" href="https://www.eter7.com/wp-content/plugins/wp-show-posts/css/wp-show-posts-min.css?ver=1.1.3" as="style" onload="this.onload=null;this.rel='stylesheet'">
    <noscript><link rel="stylesheet" href="https://www.eter7.com/wp-content/plugins/wp-show-posts/css/wp-show-posts-min.css?ver=1.1.3"></noscript>
    
    <link rel="preload" href="https://www.eter7.com/wp-content/themes/generatepress/assets/css/components/widget-areas.min.css?ver=3.1.0" as="style" onload="this.onload=null;this.rel='stylesheet'">
    <noscript><link rel="stylesheet" href="https://www.eter7.com/wp-content/themes/generatepress/assets/css/components/widget-areas.min.css?ver=3.1.0"></noscript>

    Site: https://www.eter7.com

    Regards,
    Tony

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.