• Resolved tomdhu

    (@tomdhu)


    Love the plugin!
    I have strived hard to have our home page load quickly and Asset Clean up has helped immensely. The biggest hurdle however concerns Preload of key requests and I am wondering if Asset CleanUp impairs attempts to preload fonts.
    The home page size is only 77Kb and has only 22 requests. Page speed insights says that 4.23 seconds could be saved if the fonts preloaded. The font path as declared by Google Page Speed Insights is … https://www.trapbarn.com/wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.woff

    I have tried to get this to preload using the font preload function in Asset Cleanup and I have tried using this code in the Head section…
    <link rel=”preload” href=”Font https://www.trapbarn.com/wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.woff ” as=”font” crossorigin=”anonymous”>

    Any advice would be greatly appreciated.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @tomdhu if you use “Settings” -> “Local Fonts” and add /wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.woff to the textarea, it should preload the font fine and the notice from Google PageSpeed Insights would disappear.

    Now, I’ve checked your website and it looks like you’ve added the value there. However, it was included within <script type="application/ld+json" class=yoast-schema-graph> and </scrpt> – apparently, you’re using an HTML minifying tool that interferes with it and appends it to this SCRIPT tag when it shouldn’t. It should be directly within the HEAD tag. Can you please deactivate HTML minify as you can do well without it? Let me know if that fixes it. I have to admit I haven’t seen anything like that before.

    Thread Starter tomdhu

    (@tomdhu)

    Hi Gabe,
    Thanks for the quick response. You certainly know WordPress!

    1. I switched off the Minify in W3TC but that dropped the speed rating down from 78 to 63.
    2. I then went into AC setting and entered /wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.woff in to the Preload Local Font Files box and then updated. It took the rating ack up to 76.
    3. Turning now to <script type="application/ld+json" class=yoast-schema-graph> and </scrpt>.
    This is rich text mark up that was tested with Googles Rich Text tester and it passed.
    I deleted it and it took the score up to 81 ! and the preload seems to have worked. Marvellous!!
    Does this mean I have to forget about rich text altogether and could it be that my rich text code is conflicting with Yoast’s own schema efforts?

    I now have to work on Eliminate render-blocking resources (1.8 secs) and Remove unused JavaScript (1.2 secs).
    Many thanks for your help.

    Thread Starter tomdhu

    (@tomdhu)

    Marvellous service – particularly as it wasn’t even a W3TC issue.
    Many thanks.

    Plugin Author Gabe Livan

    (@gabelivan)

    @tomdhu I’m glad you figured it out. Minifying HTML has never been an option I particularly liked as the impact it has on PageSpeed is minimal in most cases. Even WP Rocket, the well-known caching plugin, gave up on this feature: https://github.com/wp-media/wp-rocket/issues/2682

    Now, that markup was generated by Yoast SEO for a reason. I’m no SEO expert, perhaps you can ask them how exactly it would help your website. If the markup loads fine and you turned off minify HTML, then it should all be good then. Thanks for your review of Asset CleanUp!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Asset Cleanup and Preload’ is closed to new replies.