Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Preload key requests performance problem
- This topic has 5 replies, 2 voices, and was last updated 7 years, 2 months ago by
Ernest Marcinko.
-
AuthorPosts
-
March 26, 2019 at 5:49 pm #21807
raduntc
ParticipantHi, 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.
March 27, 2019 at 11:41 am #21827Ernest Marcinko
KeymasterHi,
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.March 27, 2019 at 11:45 am #21830raduntc
ParticipantHi 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.March 27, 2019 at 11:54 am #21835Ernest Marcinko
KeymasterHi,
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.March 27, 2019 at 5:35 pm #21856raduntc
Participanti 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)
March 28, 2019 at 3:06 pm #21869Ernest Marcinko
KeymasterThat 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.
-
AuthorPosts
- You must be logged in to reply to this topic.