Home › Forums › Basel support forum › Site slow: how to reduce the number of requests and Javascript codes?
Site slow: how to reduce the number of requests and Javascript codes?
- This topic has 7 replies, 2 voices, and was last updated 4 years, 10 months ago by Elise Noromit.
-
AuthorPosts
-
January 15, 2020 at 9:45 pm #168186
oleg_dmitrievParticipantWhen I access the homepage, the home page makes 104 requests each time.
It is too much. The load time of the homepage is 8.1 seconds, even under Cloudflare CDN!How can I reduce the number of requests?
Any other optimisation?See the Waterfall for the site: https://imgur.com/a/YbaXU78
January 16, 2020 at 8:59 am #168284
Elise NoromitMemberHello,
Please deactivate all the plugins not related to the theme and switch the parent theme, check the issue.
Try to combine the files with the WP Rocket plugin. Cloudflare CDN does not decrease the number of the request.
Best Regards
January 28, 2020 at 10:59 pm #170296
oleg_dmitrievParticipantThank you for your help.
I use Asset Optimizer and disable JS and CSS, if it is not on each page, where it is not necessary.
– Does the theme need Jetpack for anything? Can I remove it completely?
– Does the Basel theme need MailChimp on all pages, or only on the Chechout (I am not using subscribe to newsletter)?
– What is this JS for:
Handle: basel-autocomplete
Handle: basel-threesixty // can I disable it on the page if I am not using a 360 view?
Handle: basel-justified-gallery // can I disable it on the page if I am not using a gallery?
Handle: basel-magnific-popup // can I disable it on the page if I am not using the popup?
Handle: basel-countdownJanuary 29, 2020 at 12:06 pm #170385
Elise NoromitMemberHello,
Please add the provided code to the functions.php of the child theme:
function basel_disable_js_libs() { wp_deregister_script('basel-autocomplete' ); wp_dequeue_script( 'basel-autocomplete' ); wp_deregister_script('basel-threesixty' ); wp_dequeue_script( 'basel-threesixty' ); wp_deregister_script('basel-justified-gallery' ); wp_dequeue_script( 'basel-justified-gallery' ); wp_deregister_script('basel-magnific-popup' ); wp_dequeue_script( 'basel-magnific-popup' ); wp_deregister_script('basel-countdown' ); wp_dequeue_script( 'basel-countdown' ); } add_action( 'wp_enqueue_scripts', 'basel_disable_js_libs', 10200 );
Alternatively, you can combine JS files and all the libraries would be combined in one file.
Best Regards
January 29, 2020 at 12:47 pm #170395
oleg_dmitrievParticipantThank you!
Can you please respond to my question about JetPack:
– Does the theme need Jetpack for anything? Can I remove it completely?January 29, 2020 at 12:53 pm #170397
Elise NoromitMemberHello,
The Jetpack is not needed for the theme, it is often attached to Woocommerce, you can delete it completely.
Best Regards
January 29, 2020 at 1:00 pm #170401
oleg_dmitrievParticipantre Jetpack – thank you, will wipe it out.
which pages need MailChimp plugins? I understand that it is needed for WooCommerce checkout.January 29, 2020 at 1:43 pm #170418
Elise NoromitMemberHello,
This is the subscription plugin, you can also delete it if you do not use it.
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register