Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1279478

    Hello Support Team, I am currently working on the speed of the pages.
    For my site, Google’s PageSpeed ​​tells me:

    1. Reduce the initial reaction time of the server 1.33 s
    Make sure that the server response time for the main document is as short as possible, because all other requests depend on it. Further information.

    WordPress
    Designs, plug-ins, and server specifications all contribute to server response time. Try to find an even further optimized design, select a suitable optimization plug-in and / or upgrade your server.

    2. Preload important requirements
    0.27 s With <link rel = preload> you can prioritize the retrieval of resources that are currently only requested later when the page is opened. Further information.
    Url
    Possible savings
    … Fonts / entypo-fontello.woff2

    Can you recommend something? The mobile version in particular is very slow (see screenshot). How can I preload the font?

    Best regards

    #1279898

    Hey Talker77,

    Please try these plugins, to see if you have any luck with them: https://wordpress.org/plugins/flying-scripts/, https://wordpress.org/plugins/flying-pages/

    Best regards,
    Rikard

    #1279981

    I managed the desktop version (Pagespeed 96) … but why is the mobile version so slow? See screenshot … there must be special problems with the mobile template that the first requests are so slow.

    #1280030

    Let’s take it step by step …

    How can I solve this?

    Preload important requirements
    3.63 s
    With <link rel = preload> you can prioritize the retrieval of resources that are currently only requested later when the page is opened. Further information.
    Url
    Possible savings
    … font / custom-icons.woff2 (www.site.de)
    3,630 ms
    … fonts / entypo-fontello.woff2 (www.site.de)
    2,730 ms

    #1281359

    Hi,

    Looks like the speed tool is referring to the font files, which is loaded using the font-face rule. Unfortunately, we cannot use preload with this, but we could set the font-display property as recommended in the following thread.

    // https://kriesi.at/support/topic/entypo-fontello-and-custom-fonts-add-font-display/#post-1225248

    This is the snippet.

    
    function my_custom_font_display( $font_display, $font_name )
    {
    	// Check for a font and change the default theme setting
    	if( 'entypo-fontello' == $font_name )
    	{
    		return 'block';
    	}
    
    	return $font_display;
    }
    
    add_filter( 'avf_font_display', 'my_custom_font_display', 10, 2 );
    

    This initially hides the icon on page load and only display them once the entypo-fontello font files are available.

    Best regards,
    Ismael

    #1281414

    It’s not really successful :-(
    Is there another possibility?

    #1282021

    Hi,

    Thank you for the update.

    Please note that the snippet above will not change anything on how the theme loads the entypo-fontello font, so the speed tool will still complain about it, but it should improve the loading performance of the icons in the front end. Unfortunately, the only way to load entypo-fontello is with the font face rule, so we will not be able to use preload and/or satisfy the pagespeed insights tool.

    Best regards,
    Ismael

    #1282229

    Help this in function.php?

    /** Head Font Preloading **/
    function font_preloading_preload_key_requests() { ?>
    <link rel=”preload” as=”font” type=”font/woff2″ href=”/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/fonts/entypo-fontello.woff2″ crossorigin=”anonymous”>
    <link rel=”preload” as=”font” type=”font/woff2″ href=”/wp-content/plugins/floating-contact-buttons/assets/font/custom-icons.woff2″ crossorigin=”anonymous”>
    <?php }
    add_action( ‘wp_head’, ‘font_preloading_preload_key_requests’ );

    Or is there a special file for the mobile version where I have to insert this? As I said, the desktop version is fast enough, only the mobile version is slow.

    #1282254

    Hi,

    As we have said above, you cannot use the link tag to load the icon font, it will only work with the fontface rule, so the warning in the page speed insight tool will remain unless you disable the icon fonts.

    Thank you for your understanding.

    Best regards,
    Ismael

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