Won't work if javascript loaded asynchronously or moved to footer
-
I’m looking for some way to load my website’s javascript files asynchronously or move them to footer. I tried using the Asynchronous Javascript plugin, but Alfie isn’t working with it.
Also used the following code, which also hides Alfie:
remove_action('wp_head', 'wp_print_scripts'); remove_action('wp_head', 'wp_print_head_scripts', 9); remove_action('wp_head', 'wp_enqueue_scripts', 1); add_action('wp_footer', 'wp_print_scripts', 5); add_action('wp_footer', 'wp_enqueue_scripts', 5); add_action('wp_footer', 'wp_print_head_scripts', 5);
Could you please check the compatibility with Asynchronous Javascript? Whitelisting the js files in Alfie’s js folder also didn’t work.
I’m badly in need of Asynchronous Javascript, as it improves my loading speed significantly, but I’m not willing to part with Alfie.
For now I’ve deactivated Asynchronous Javascript as I want Alfie more.
Hope you’ll be helpful, as always.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Won't work if javascript loaded asynchronously or moved to footer’ is closed to new replies.