- This topic has 17 replies, 3 voices, and was last updated 2 years, 3 months ago by Leo.
-
AuthorPosts
-
December 15, 2021 at 2:45 am #2049617Benjamin
Hello, I use Ezoic to optimize my websites.
They have a technologies tab of tech slowing down your website. There are 3 technologies that I’m not sure where they are coming from on my site that seem to be slowing things down a lot- namely JQuery, jQuery Migrate, and jQuery Matchheight- are these added by GP/ GP Premium possibly? Just trying to find the root.
Thanks!
December 15, 2021 at 4:21 am #2049709DavidStaffCustomer SupportHi there,
GP only requires jQuery and only enqueues it if you have the Sticky Navigation enabled. But plenty of WP plugins require jQuery. If you’re not using sticky nav, or your disable it, and jQuery still loads then its not GP making the request.
December 15, 2021 at 5:17 am #2049781BenjaminHello David,
Thanks. I see the sticky nav falls under menu plus and I have that disabled so can’t be that. What about Generateblocks perhaps? But as you said it could be any plugin, although I only use a few.
I’ll link the site in the private section if you want to have a look, but no need if you’re busy.
Take care.
December 15, 2021 at 5:41 am #2049810DavidStaffCustomer SupportWP Show Posts uses it in some instances.
If you force jQuery to not load then you would need to disable the matchHeight script in WP Show Posts. Tom provides a snippet for that here:https://wpshowposts.com/support/topic/design-question/#post-18421
But i cannot say if there aren’t other plugins that are dependent on jQuery
December 23, 2021 at 1:34 am #2057407BenjaminSure thanks,
What exactly does the match height do? Is it fine to remove it?
December 23, 2021 at 8:12 am #2057785DavidStaffCustomer SupportIts for resizing grids so each column occupies the same height. Remove it and see if you notice any difference.
December 29, 2021 at 7:15 am #2062812BenjaminOkay cool, where does that code need to go? Functions.php? If there I’ll probably have to use the codesnippets plugin.
December 29, 2021 at 7:16 am #2062816BenjaminDecember 29, 2021 at 7:42 am #2062862DavidStaffCustomer Support1. Yeah functions.php in Child Theme or in the Code Snippets plugin.
2. And thats the correct Code.And just as a final piece add this to your functions.php:
// Disable Jquery add_filter( 'wp_enqueue_scripts', 'change_default_jquery', PHP_INT_MAX ); function change_default_jquery( ){ if ( ! is_admin() ) { wp_dequeue_script( 'jquery'); wp_deregister_script( 'jquery'); } }
This will remove jQuery from the front end. But you need to make sure there are no other plugins that require it.
December 29, 2021 at 7:52 am #2063016BenjaminCool thanks. I own the perfmatters plugin for removing a bunch of scripts and I also have Ezoic which removes scripts of it own. I’ll just check if I can get rid of JQUERY there before I add the JQeury code.
Also, as far as I know WP Show Posts will become part of GP Blocks somewhere in 2022? Will it still use the match height then as I know GP Blocks is quite lightweight. Might not want that code in there?
December 29, 2021 at 9:01 am #2063083LeoStaffCustomer SupportAlso, as far as I know WP Show Posts will become part of GP Blocks somewhere in 2022?
It will be part of GenerateBlocks pro and likely in 2022 🙂
December 29, 2021 at 11:12 pm #2063534BenjaminHi just regarding the code David gave to remove Jquery from the front end- this doesn’t remove Jqeury core right? (Not sure if you need Jquery core, but I think you do).
thanks!
December 30, 2021 at 10:31 am #2064169LeoStaffCustomer SupportIt should remove jQuery overall.
December 30, 2021 at 11:13 am #2064207BenjaminAlright sure, I’ll try it out then and see if there are conflicts. Perhaps a good idea to make sure with all the developers of the plugins I use. Luckily I don’t have many.
I might as well start here-
- WP Show Posts (Uses Jqeury Matchheight- reason for ticket- but will test) anything else?
- Generateblocks
- Generatepress/ GP Premium
Could you just confirm that any of these above don’t use jquery? Apart from what is mentioned.
Thanks.
December 30, 2021 at 11:55 am #2064247BenjaminAnd while we’re at it can you just confirm if any of those use Jquery Migrate also? Thanks.
-
AuthorPosts
- You must be logged in to reply to this topic.