It loads jquery in the header
-
Hello
thank you for this amazing plugin!
I love it, but it loads the main script that depends on the jquery library in the header.
You don’t need your script in the header.
If in the main file sendiblue.php of your plugin I replace your line of code
wp_enqueue_script( 'sib-front-js', self::$plugin_url . '/js/mailin-front.js', array( 'jquery' ), filemtime( self::$plugin_dir . '/js/mailin-front.js' ),false);
with:
wp_enqueue_script( 'sib-front-js', self::$plugin_url . '/js/mailin-front.js', array( 'jquery' ), filemtime( self::$plugin_dir . '/js/mailin-front.js' ), true);
all still work, jquery and your script are moved to the footer, and the performance of the website is a lot better.
The plugin is very nice and useful, but until it has this problem related to the performance, I would not suggest it to other users.
In my case I will solve it in the final speed optimization, it’s just a suggestion for improving your plugin.
- The topic ‘It loads jquery in the header’ is closed to new replies.