Preload key requests performance problem

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Preload key requests performance problem

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 5 years, 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #21807
    raduntc
    raduntc
    Participant

    Hi, im getting following warning from google for lower perfeomnce which includes below URL that has Ajax search pro properties.

    Preload key requests -1.82 s
    Consider using <link rel=preload> to prioritize fetching resources that are currently requested later in page load.

    https://mydomain.com/wp-content/plugins/ajax-search-pro/css/fants/icons/icons2.woff2

    what should i do to resolve this.please advice.

    #21827
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    That suggestion would actually decrease the page loading performance. The font is not preloaded, the browser will decide the best possible timeline to load that font file (includes only icons).
    I would very highly suggest ignoring this, as preloading would actually cause a lower performance, since this font file is not high priority.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #21830
    raduntc
    raduntc
    Participant

    Hi Ernest,
    But this Preload key requests is most time taking thing when my site loads it takes a average of -1.82 seconds.im ok to ignore it if it does only take few miliseconds .is there anyway to fix this.

    #21835
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I don’t think it takes even milliseconds, as the font file size is 2.3kb only, without gzip, with gzipped communications it’s even less. I’m not even sure it is possible to move this asset to a link tag with a preload attribute, as WordPress does not have an option to add the ‘preload’ attribute there.
    I did a quick test on gtmetrix with a 60kb icon file, it took 12.2ms, so 2.3kb should take much less time to request, even less if you use cloudflare or any other CDN.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #21856
    raduntc
    raduntc
    Participant

    i have attached a screenshot of google speed test .in that https://mydomain.com/wp-content/plugins/ajax-search-pro/css/fants/icons/icons2.woff2 URL is under Preload key requests which is taking 1.2 second.

    also if there is no solution im Ok to have a solution that does not load icons on search bar.and only the fonts will show up.(as in my knowledge i think this happens when script try to load the search icon)

    Attachments:
    You must be logged in to view attached files.
    #21869
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    That test shows all key requests as an estimation, in reality doing the recommended solution will more likely make the page speed slower, as the icons will be requested and rendered earlier. Unfortunately however it is not possible to move it like that, since wordpress does not support that attribute addition, so it does not really matter, the same issue would be reported either way.

    You can remove this piece of code from the wp-content/plugins/ajax-search-pro/includes/classes/actions/class-asp-stylesheets.php file, from lines 109 to 126. Then clearing the cache, and it should not be there anymore. That should do the trick.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.