• 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

    • This topic was modified 8 years, 4 months ago by richsalvucci.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Rich,

    Have you tried to use a cache plugin, W3 Total Cache or similar?

    Thread Starter richsalvucci

    (@richsalvucci)

    Hi Ben,

    It is now loading in around 500ms. We switched to a VPS with dedicated resources and that resolved the issue.

    Thanks,
    Rich

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Dequeue the Javascript’ is closed to new replies.