How to Dequeue the Javascript
-
Hi,
I am having an issue where the Javascript is loading really slowly, it takes around 7 seconds.
I attempted to use the .htaccess fix listed in these posts.
https://www.ads-software.com/support/topic/performance-problem-with-the-calendar/
https://time.ly/forums/topic/upcoming-events-widget-on-homepage-loads-slow/The htaccess rule is not working for me because of the host I am running on the rewrite cannot be done in the htaccess. I attempted the solution Lukas gave to Dequeue the script, but cannot get that to work with this code in my functions.php:
add_action( 'wp_head', 'ai1ec_dequeue_js', 0 ); function ai1ec_dequeue_js() { wp_dequeue_script( Ai1ec_Javascript_Controller::JS_HANDLE ); }
Is there another way to do this? I was planning on manually enqueing the script in my functions.php. I have also tried using Front End Rendering and Advanced JS caching? Are there any other options to get the script loading from a static file to speed up the site?
Thanks for the help.
-Rich
- The topic ‘How to Dequeue the Javascript’ is closed to new replies.