In order to speed up loadtime I try to avoid unnecessary loads. In the Google report (and in my html) I see that many unwanted files are loaded, as jquery-migrate.min.js?ver=1.4.1, core-min, mouse-min, button-min, widget-min and more. I am certain I do not need or use them but they cause (among more) a terrible loadtime. I am using theme Twenty Seventeen.

What should I do to avoid loading these jquery-min files?

The site: www.vakantiehuisverhuur.eu.

Regards Rudolph Smits, NL

  • You can try to find a responsible plugin by disabling them one by one like mentioned here.
    – moped
    Feb 21, 2019 at 11:44

3 Answers 3


I can not explain this but this seems to be solved.

Using Autoptimize already but now aggregating javascript in stead of minify did the job. I could not do this before because it made Contact Form 7 fail to redirect to a "thank you" page after sending a form. With the help of the author that has been solved so that I can "aggregate" now.

I saw people from all over the world visiting my site. Thank you for your intention to help. Moped, especially to you!

Regards Rudolph Smits, Netherlands


add the following codes to the functions.php file:

// Remove Query Strings

function _remove_script_version( $src ){

    $parts = explode( '?ver', $src );
    return $parts[0];

add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );

// Remove jquery migrate
function dequeue_jquery_migrate( $scripts ) {
  if ( ! is_admin() && ! empty( $scripts->registered['jquery'] ) ) {
    $scripts->registered['jquery']->deps = array_diff(
        [ 'jquery-migrate' ]
add_action( 'wp_default_scripts', 'dequeue_jquery_migrate' );
  • You should explain your code a bit. Feb 21, 2019 at 16:37

Trying to find out what "migrate" does I found this wordpress plugin: https://nl.wordpress.org/plugins/remove-jquery-migrate/

I think it does the same as the code of Maynor Peralta above but his code will do it more efficiently. I will try do apply that next week.

Yesterday I got a ban from Google Recaptcha v3 due to - I think - to many same test actions. I will have to wait till this is over. ;-(

Regards Rudolph Smits

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.