Close

Account

Documentation

Forum

Menu

JNews – Speed for jquery.js async

  • Post count: 258
    Communication Contact
    December 20, 2017 at 9:19 pm #26750

    Hi,

    1. I wanted to know if it was possible to leave the file /wp-includes/js/jquery/jquery.js in the header async.

    2 . While removing the /wp-includes/js/jquery/jquery-migrate.min.js file

    For the rest of the js and css files I used Concat, Minify and Defer configuration already present in the plugin.

    Let me know, and have a good job.

    Post count: 11183
    Adek
    December 21, 2017 at 10:45 am #26762

    Hi Communication Contact,

    1. Yes sure, you can enable Load jQuery Early option. You can find this option on the Customize > JNews : Speed Option > Advanced Options > Load jQuery Early. After that please clear the cache from JNews Speed plugin and your browser cache.

    2. Do you want to unload /wp-includes/js/jquery/jquery-migrate.min.js, right?

    Thank you

    Post count: 258
    Communication Contact
    December 21, 2017 at 7:24 pm #26788

    Hi Adek,

    yes but I wanted jquery.js in “async” because it is not when I activate the plugin panel.

    Then if it was possible to remove jquery-migrate.min.js or even to limit it to async.

    They are small updates that could also affect other users.

    As a result, the pagespeed score remains unchanged and the site works fine, it does not break because of the jquery.js in the footer.

    I hope you understand, what I want.

    If this is possible for other users, this new feature is also available.

    1. Then jquery.js and jquery-migrate.min.js in “async” of course staying in the header.

    2. With the option of being able to permanently remove jquery-migrate.min.js from the wordpress header.

    I noticed that you put our site http://www.knews.it among the fastest sites in the speed of Google pagespeed, in the coming weeks, we are migrating on the Cloud id Google, so there will be a further increase in speed.

    Thanks and good job.

    Post count: 258
    Communication Contact
    December 23, 2017 at 7:31 pm #26834

    Hi,

    There’s news about that?

    Thanks and good job.

    Post count: 11183
    Adek
    December 26, 2017 at 1:43 pm #26880

    Hi Communication Contact,

    Sorry for late reply. Unfortunately, we don’t have that kind of feature. At the moment, we only use the async attribute on minified js file.

    Thank you

    Post count: 258
    Communication Contact
    December 27, 2017 at 1:02 am #26910

    Hi,

    you can not at least add the async function for the two header files jquery.js and jquery-migrate.min.js

    At least only this function for now ???

    I await your feedback on this

    Good work and merry Christmas…

    Post count: 11183
    Adek
    December 28, 2017 at 9:11 am #26940

    Hi Communication Contact,

    You can try to use this function below:

    You will need to use JNews child theme and put the code above on the functions.php file.

    Thank you

    Post count: 258
    Communication Contact
    December 28, 2017 at 9:38 am #26941

    Hi,

    the function you gave me works perfectly.

    A single problem that thema does not work well if I enable also Concat, Minify and Defer (Merge all scripts (JS & CSS), Minify all scripts (JS & CSS) and defer load CSS.) Of your plugin JNews: Speed Option.

    But I’ve noticed that the same error does it even when I enable Load jQuery Early (Enable this option to prevent some JavaScript.
    Notes: By becoming this option, the JavaScript becomes blocking.)

    So maybe there’s an error in the JNews plugin: Speed, I guess.

    What do you think about it???

    Thank you e good work…!!

    Post count: 11183
    Adek
    December 28, 2017 at 11:03 am #26954

    Hi Communication Contact,

    It because of the jquery file loaded by async method. The other JavaScript file that using jQuery library will showing error.

    When you enable Concat, Minify and Defer (Merge all scripts (JS & CSS), Minify all scripts (JS & CSS) and defer load CSS.) option actually we package all of the JavaScript files into 1 file and it already using async method.

    But sometimes on a certain plugin (like Revolution Slider) insert several inline JavaScript codes that using jQuery library on their element and it will show an error since the jQuery file load at the bottom (in the footer instead of the header). It’s why we provide Load jQuery Early option to prevent this error. But by using Load jQuery Early option, the JavaScript becomes blocking because the jQuery file load in the header. Hopefully, i explain it well.

    Thank you

    Post count: 258
    Communication Contact
    December 28, 2017 at 11:39 am #26957

    Hi,

    so i advise you to use only Concat, Minify and Defer option.

    In addition to your plugins I’m using only:

    Accelerated Mobile Pages
    AMP Category Base URL Remover
    CDN Enabler
    The SEO Framework
    The SEO Framework – Extension Manage

    But we noticed that in the search for google we lost positions, so we thought to insert the jquery.js and jquery-migrate.min.js,

    What do you recommend?

    Post count: 11183
    Adek
    December 29, 2017 at 10:32 am #27007

    Hi Communication Contact,

    For me, i will recommend you to use the previous setup before you ask to put the jquery and jquery migrate file into the header with the async attribute.

    May i know why previously you want to put the jquery and jquery migrate file into the header with the async attribute?

    Thank you

    Post count: 258
    Communication Contact
    December 30, 2017 at 7:03 am #27050

    Hi,

    So recommend this configuration of JNews: Speed Option

    Move Script to Bottom: Enable
    Concat, Minify and Defer: Disable
    Print Above The Fold CSS: Enable

    *HTML Option

    Minify HTML output: Disable

    *Advanced Options

    Enable JNews Speed when user logged in: Disable

    Load jQuery Early: Enable

    _____________________________________________________

    I have chosen to put async the jquery.js and jquery-migrate.min.js files leaving them in the header as suggested by Google Speed.

    Otherwise the Speed Google mobile score is only 70/100 and the 86/100 desk

    While now it is 98/100 mobile and 98/100 Desk

    ________________________________________________________

    What do you suggest, that you are a great expert?

    Post count: 11183
    Adek
    January 2, 2018 at 12:29 pm #27105

    Hi Communication Contact,

    Actually, I’m not expert on this thing. In this case, since you’re putting the jquery.js and jquery-migrate.min.js file in the header it will be causing render-blocking JavaScript for Google page speed result. But this method can prevent some JavaScript error as I explained previously above. About async method for jquery.js and jquery-migrate.min.js, if this causing errors or decrease the Google page speed result, i think you don’t need to use this method.

    Thank you

    Post count: 258
    Communication Contact
    January 2, 2018 at 9:00 pm #27114

    Hi Adek,

    1. I’m sorry but maybe I have not explained well the method async, of the files jquery.js and jquery-migrate.min.js, serves to prevent the rendering-blocking JavaScript for Google Speed.

    2. You still have not sent me the best configuration of JNews: Speed Option

    I hope I have been clear, I wait for your comment and good work.

    Post count: 11183
    Adek
    January 3, 2018 at 10:35 am #27135
    This reply has been marked as private.

You must be logged in to reply to this topic.