- This topic has 25 replies, 4 voices, and was last updated 3 years, 2 months ago by Tom.
-
AuthorPosts
-
November 19, 2019 at 3:57 am #106724593487u5tr938ouh4trnos8fyoh
Please update the JS libraries. You can use the slim and minified versions.
November 19, 2019 at 6:06 am #1067359DavidStaffCustomer SupportHi there,
jQuery is a WP include and is not controlled by GP.
And GP only requests jQuery if the sticky navigation is enabled, the rest of the theme only uses vanilla Javascript where required.November 19, 2019 at 6:11 am #106736493487u5tr938ouh4trnos8fyohAre you sure as I have tried several other themes and it doesn’t happen with the like Astra? Maybe they don’t use jQuery or something?
November 19, 2019 at 6:18 am #1067365DavidStaffCustomer SupportjQuery is included in WordPress.
GP by default does not enqueue it unless sticky nav is enabled.
If sticky nav is not being used and the request is being made then it will be a plugin or other script requesting it.November 19, 2019 at 7:09 am #106751693487u5tr938ouh4trnos8fyohSticky nav is activated and there are no other plugins other than Autoptimize. WordPress 5.3
The reason why I care is because it lowers the lighthouse score and Google won’t admit but that is counting against the site.
I had to use an external plugin to fix that I don’t want to.
November 19, 2019 at 7:18 am #1067533DavidStaffCustomer SupportSticky nav is the last jQuery dependency in the theme – until we find a good replacement that can maintain backwards compatibility it unfortunately must stay.
The only resolution today is to not use the Sticky Nav – it can be done with CSS ( albeit without transitions ) if you want help with that.November 19, 2019 at 11:49 pm #106806093487u5tr938ouh4trnos8fyohRegarding CSS, I really prefer to use the regular options of a theme and plugins. When I start adding custom customizations and custom code, it complicates things in future and brings issues. This means I will “stick” the sticky menu as it is intended by your software.
Regarding jQuery, since I am not a developer, can you please elaborate on the thing. As a search marketer, I do suspect that Google is using Lighthouse scores for rankings, but they won’t admit it publicly. That is why my final goal is to increase the scores there. One of the detected issues, which lowered the scores was the detected outdated jQuery library version which Google claims to have two security vulnerabilities. Some WP claims this is false positive, however I am not concerned weather or not that is a false positive as Google is objectively lowering the score because of this and aslo Google and others doesn’t always say publicly all security issues that they know about. Since WordPress is powering so many sites, I suspect they may be working with someone behind the scenes to resolve the issues without describing them in public. In any of these I don’t actually care about that. I care about the score, right now.
From my understanding, please confirm if I understand it correctly. jQuery libraries are not within your theme, they are inside WordPress, right? And these WP libraries are used when your theme uses a specific function, right?
Using jQuery Manager for WordPress and loading jquery-3.4.1.min.js resolved the score. However I don’t want to use a plugin to do this. Does it mean that I have to contact WordPress as their jQuery version is lower than 3.4.1 and they have to update it?
November 20, 2019 at 5:15 am #1068308DavidStaffCustomer SupportCorrect – jQuery is included within WordPress not the Theme. Whenever a theme or plugin declares a dependency in its scripts the library is loaded.
WP cannot update to the latest version (3) of jQuery as its not backward compatible and risks breaking a huge amount of sites.jQuery Updater or jQuery Manager plugins are the simplest fix. I use the former if required. They only switch the frontend. If you want to try it manually then this stack explains:
https://wordpress.stackexchange.com/a/257363
But personally i would just go with the plugin.
November 20, 2019 at 5:23 am #106831693487u5tr938ouh4trnos8fyohI guess than I have an unfair advantage having that plugin as not many people would know about these scores.
Thanks, also worried that Google knows about something in relations to security that could expose many WP sites as they suggest two security issues.
November 20, 2019 at 7:11 am #1068590DavidStaffCustomer SupportIt falls under Best Practice that doesn’t have an impact on performance or UX so i can’t see Google being overly bothered. If it were a ‘real’ security threat then your security plugins would flag and close off the issue.
But its nice to get those 100 ratings on the report even if some of them are just vanity metrics.
November 20, 2019 at 10:00 am #106879093487u5tr938ouh4trnos8fyohI’ve done some tests on the subject, an employee of a big company told me “if we tell them we use these scores, everyone would try to achieve top score and it will defy the purpose of the signal.”
March 13, 2020 at 10:53 pm #1194334MarcusHi there,
I am having this issue where I still have Jquery loading but have removed all the components mentioned above. What could be loading it?
March 13, 2020 at 11:02 pm #119433793487u5tr938ouh4trnos8fyohWP Rocket seems to have a feature now to remove jQuery.
March 14, 2020 at 5:47 am #1194562DavidStaffCustomer SupportHi Marcus,
as per the other topic you would need to disable all plugins to test what is loading jQuery. There is a possibility that your host has installed a Must Use plugin that is calling it.
If you want to raise a new topic where you can privately share a link to your site, ill take a look to see if there is anything obvious making the jQuery request.
January 9, 2021 at 5:08 am #1611974JeffWant to follow up if stickynav still uses jquery. If so, please let me know further how to get sticky nav without js (css is fine). Or some small bit of js and not the whole jquery library. Thanks, you guys are great.
-
AuthorPosts
- You must be logged in to reply to this topic.