Slow Load time for Website
-
My website is very slow loading since Social Solializer has been installed.
I have found several similar support posts approx 1 year ago.SS General settings
Already have Include Javascript in website footer enabled.
Load all Javascript files in a single file that did not help.Using GTMetrix
Total Loaded Time Total Page Size Requests
5.8sec 1.03KB 58
Add the code below
2.0 830MB 49/**
* Remove about 300kb by loading social login scripts and styles only
* pages that have a login form
*/
$account_pages = array(“account”, “checkout”);function us_filter_scripts() {
global $wp_scripts, $wp, $account_pages;wp_dequeue_script(‘wc-add-to-cart’);
wp_dequeue_script(‘wc-cart-fragments’);if (empty($wp->query_vars[‘pagename’]) || !in_array($wp->query_vars[‘pagename’], $account_pages)) {
wp_dequeue_script(‘the_champ_combined_script’);
wp_dequeue_script(‘the_champ_ss_general_scripts’);
wp_dequeue_script(‘the_champ_sl_common’);
wp_dequeue_script(‘the_champ_sl_google’);
wp_dequeue_script(‘the_champ_fb_sdk’);
wp_dequeue_script(‘the_champ_sl_facebook’);
}
}
add_action( ‘wp_print_scripts’, ‘us_filter_scripts’ );function us_filter_styles() {
global $wp_styles, $wp, $account_pages;if (empty($wp->query_vars[‘pagename’]) || !in_array($wp->query_vars[‘pagename’], $account_pages)) {
wp_dequeue_style(‘the_champ_frontend_css’);
}
}
add_action( ‘wp_print_styles’, ‘us_filter_styles’ );So it appears nothing has yet been done to improve the plugin effect on the load time.
- The topic ‘Slow Load time for Website’ is closed to new replies.