Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #714110

    Hello,
    on my GTmetrix my webiste has got 0 in Defer parsing of JavaScript.
    So, I used this code:

    function defer_parsing_of_js ( $url ) {
    if ( FALSE === strpos( $url, '.js' ) ) return $url;
    if ( strpos( $url, 'jquery.js' ) ) return $url;
    return "$url' defer ";
    }
    add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );

    but nothing happened.
    How can I improve the grade?

    #714288

    Hey Gian Maria,

    Did you try using a minify plugin? https://wordpress.org/plugins/bwp-minify/

    Please link to your results if you should need any further help.

    Best regards,
    Rikard

    #714786

    I’m doing it but it doesn’t help.

    Gt-metrix

    #715859

    Hi,

    image you’ve provided does not display, please imgur.com or dropbox instead. Does it work for you with a default WP theme? Anyway, seems that you need to search for another plugin with such functions. Hope you’ll find one which is compatible.

    Best regards,
    Andy

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.