slow page by .js

Associate
Joined
14 Jul 2020
Posts
1
Hello, I am the creator of https://programalia.net and it turns out that doing several speed tests on the web gives me great slowness, and the things that make it slow tell me that they are type things:
wp-include / js / jquery / jquery.js? ver = 1.12.4-wp

I don't know if you will know how I can lighten the web by removing those .js and give me a better score
 
Soldato
Joined
18 Oct 2002
Posts
10,055
WordPress by default comes packaged with Jquery a javascript library that is used for some parts of the WordPress Dashboard.

If you are not using Jquery scripts in your website then you can add this to your functions.php file to deregister it from the frontend but leave it working in the backend dashboard.

function my_init() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', false);
}
}
add_action('init', 'my_init');

If your using a prebuilt theme then some JS plugins might be dependent on Jquery, so this may or may not break your site.
 
Soldato
Joined
18 Oct 2002
Posts
15,203
Location
The land of milk & beans
Use the performance profiler in Chrome dev tools to performance test the speed of your site. Then you can see exactly what parts are slow and optimise them.

It's not a good idea to 'optimise' randomly without knowing the exact cause of the issue. Often times you'll end up wasting your own time achieving nothing, or make things worse.
 
Back
Top Bottom