dhampius
Forum Replies Created
-
Hi,
wpdreams I confirmed that the issue comes from the external font load from fonts.googleapis.com/css?family=Noto Serif. After the user uses the search engine and lands on a page, cache is saved in their browser and the issue does not happen again.
I was wondering between installing “Optimize My Google Fonts” WordPress plugin to help optimize the loading of the Google Fonts or adding a script to load the fonts async. with all other scripts:function load_fonts_asynchronously() {
wp_dequeue_style(‘notoserif’);
wp_enqueue_style( ‘notoserif’, ‘https://fonts.googleapis.com/css?family=Noto+Serif&display=swap’, array(), null );
}
add_action(‘wp_enqueue_scripts’, ‘load_fonts_asynchronously’);However, I am aware that the async. script will always load and will not benefit from the cache plugin. So I decided to stick with the font plugin I mentioned above.
I would be very thankful, if you could share your opinion and approach based from the info I have provided and about my decision. You can also mark the topic as solved after you answer. Thanks.I have a testing instance on a virtual machine. I cannot reproduce the issue there at all, which means that you are correct, indeed. It is something external that messes with the automatic scroll. However, me or people from my team cannot reproduce the issue on production too, at the moment.
Which leads me to 3 possible reasons that might be root cause of this. 1. Cloudflare , 2. A specific Google font that loads at the beginning of the HTML. 3. The shared hosting server, sometimes this server tends to get attacked a lot, and when this happens it freezes and starts to lag, our website even gets down sometimes. So I believe in case of slowness, this issue could also occur.
I am thinking it is possible reason number 2 – the external google font we are using on our HTML+CSS pages – link href=’https://fonts.googleapis.com/css?family=Noto Serif’ rel=’stylesheet’ because never has the issue happened on the standard text only pages. Also the font is in the beginning of the html so it needs to be externally loaded and affects the entire text of the page. Wpdreams, what do you think?- This reply was modified 1 year, 8 months ago by dhampius.
Thank you for your answer!
We are using WP 6.1.1 with the free version of Cloudflare and WP-Optimize as a cache plugin. The CSS is set within the HTML with the style tag, so the CSS is loaded along with the HTML.
Is there possibly a way to avoid the issue with the search engine from happening again with some kind of configuration?
Otherwise, maybe we should drop the Cloudflare or the cache plugin to fix this?
Thanks in advance for your answers.wpdreams the search engine always scrolls. The problem appears rarely, but when it does, the search engine stops before the highlighted words and they are not displayed on the monitor, so you have to scroll manually, but I doubt our users will know that. We are using the search engine in a manually started autocomplete search mode only. The issue never happens in standard text only pages created with text blocks, where the text is copy pasted from a document. The issue started happening on pages with custom html blocks where the text is imported with HTML + CSS code.
I don`t think it is script loading related because the issue never happens two times in a row or more. If I click the same search result a second, third, fourth, fifth etc. times the auto scroll runs correctly. If I then search for another string, the issue might happen again, but only the first time and it normalizes when you click again the same search result.
- This reply was modified 1 year, 8 months ago by dhampius.
So you mean that if I keep the plugin on auto-update, it will work until WP version 7 is released?
Thank you for the answer, but I am using custom code for additional functionality and it is not possible to remove or edit it at this stage. I will stick with the old version.
Here you go.
OS Ubuntu 22.04, tested on Chromium and Firefox.
Also, when I reverted to the old version of the plugin, the feature started working again.
Yes, the same feature from the picture. I cannot provide a link yet, since my test instance is on a localhost related VM, but if you want, I can share my screen on Teams.
To represent the issue, purge the cache from WP and from browser, reload the search engine and type something different than the string you have used before when It was working.
My WP version is 6.1.1If I buy the premium version, how do I set it up? Can I test it in a demo environment?
Ah, no worries. I will just segment the text into more pages.
Thanks for the answer.