Home › Forums › WoodMart support forum › GET RID OF JQUERY FOR PERFORMANCE REASON
GET RID OF JQUERY FOR PERFORMANCE REASON
- This topic has 10 replies, 3 voices, and was last updated 3 years, 11 months ago by
Jeriss Cloud Center.
-
AuthorPosts
-
March 17, 2021 at 10:31 am #274242
Jeriss Cloud CenterParticipantDear,
jQuery is becoming a library that is not in line with the new Core Web Vitals. Because it’s a js script that must be loaded early in the waterfall, it’s generating a high value in the Total Blocking Time and therefore reduce the performance of the website.
Personally, I am trying to get rid of all plugins depending on jQuery and replace them by others that don’t use it to improve the performance of my site. Now, how about Woodmart? I see some features of your theme use jQuery, do you plan on getting rid of jQuery?
Exemples :
/wp-content/themes/woodmart/js/jquery.tooltips.min.js
/wp-content/themes/woodmart/js/jquery.magnific-popup.min.jsThanks
March 17, 2021 at 12:33 pm #274310
Artem TemosKeymasterHello,
jQuery library is used by WooCommerce and that is why we don’t see any reasons to not use it by our theme.
Kind Regards
March 18, 2021 at 6:42 pm #274661
Jeriss Cloud CenterParticipantReference to an article below (I could add many others too) which explains that SPEED is the sole reason why you should get rid of jQuery
https://wpspeedmatters.com/jquery-performance/
It’s not because it’s available in WordPress and WooCommerce that you should do the same. jQuery may make things easy to code but things that used to be difficult to code before are not necessarily as such nowadays.
Please consider this and get rid of jQuery. You dont need to just follow others when they do something bad. It’s not because others do something bad on performance level that you should do the same. Be in advance and make Woodmart great by removing jQuery dependency.
March 19, 2021 at 7:10 am #274751
Jeriss Cloud CenterParticipantI have another idea. Why not creating a jQuery generator ? Similar to the WPB Generator that you designed in the theme.
jQuery is a library from which we are not always using everything. I searched all over the web and didnt find any light version of jquery.
Can you at least try something like this?
March 19, 2021 at 7:12 am #274755
Artem TemosKeymasterWe didn’t mean that we use jQuery just because WooCommerce does it. Even if we remove our dependency on this library, it will be loaded anyway on your website because it is always loaded by WooCommerce and 90% of other plugins.
March 19, 2021 at 7:26 am #274760
Jeriss Cloud CenterParticipantI know it’s also used by WordPress and WooCommerce but it must be said too that not 100% of this library is necessarily used.
I think it wouldbe great if we could have some kind of jQuery generator similar to the WPB Generator that you designed in the theme.
This would allow us reducing the size of the file, loading only the elements that are used (after investigarion trial and error) in our website. Same as the WPB Generator.
March 19, 2021 at 7:29 am #274761
Artem TemosKeymasterYeah, that might be a solution. But to tell the truth, it is not possible for customers, and even for us, to understand which part of jQuery is used by all plugins installed and which are not.
March 19, 2021 at 7:32 am #274762
Jeriss Cloud CenterParticipantYou’re probably right, it’s difficult for you to know what WE use. So I think the solution for now would be a jQuery Generator allowing us to select which elements of the library should be loaded and it’s up to the user responsibility to test.
Do you think this is achievable? Can this be added in your plans? I really think this would be a critical and huge improvement for the perfromance of your theme. You may be aware that many many blogs keep testing the best lightweight and fast themes, if you had sich kind of tool you’d certainly raise higher than any other theme.
March 19, 2021 at 10:16 am #274810
Artem TemosKeymasterSorry, but we can’t say at the moment that it is possible to implement such a generator. We don’t know if it is possible technically. But we will review this with our team.
March 19, 2021 at 12:38 pm #274855
pixelcellarParticipantjQuery is managed by it’s own company, any configuration tool to seperate out functionality would need to be created by themselves and then provided for use. I agree it would be useful, they do a similar thing to what is being asked for here with jQuery UI, you can create an optimised file.
However as the theme creators have said, all the time jQuery (in any form) is being used in the core of WordPress or WooCommerce it’s there to be used, it’s not causing any more of a performance hit to anybody’s website and using it can be quicker to dev with and indeed quicker on the front end for queries to execute.
Gevcen, I’d target your request to John Reisig and co at jQuery, chances are as it’s popularity is waning (only a little) they won’t be looking at doing this or it may not be possible. There is a lite version, available on their downloads page that removes ajax requests etc (all do-able natively in js), i suspect the rest isn’t so easy to seperate or they’d have done it a long time ago.
If you’re looking for a fast theme then this is about as good as it gets if you want a pile of functionality thrown in. Otherwise it’s a case of build your own to your specific requirements. You could also look at using the WordPress API’s to create your own front end entirely, you then have the freedom to do as you please…
March 20, 2021 at 10:10 am #275019
Jeriss Cloud CenterParticipantI understand your answer and Woodmart support’s answer too.
I am just trying to find a solution (or an alternative/temporary solution) for the biggest remaining issue that is on my website => the enormous size of the jquery library script.
Have a look at the Mobile score where we can see how much time & resource the loading of this library takes, and this is causing strict Total Blocking Time because nothing can load beforehand and it has to load early in the waterfal.
I know WordPress & WooCommerce still use it, and I get it that if they use it, then why Woodmart wouldn’t. But I think it’s not the proper way to see it. If themes & plugins lead the way out, then WordPress & WooCommerce will see that the dependency to jQuery is reducing over time, and therefore they would see less and less reasons to keep using this library.
So I think the first step should come from themes & plugins developers to show that things can be done differently and better for performance.
KR
Attachments:
You must be logged in to view attached files. -
AuthorPosts
- You must be logged in to create new topics. Login / Register