New Landing How can we help? Themeforest Theme Support Joyn How to defer loading of certain CSS/JS to only load on required pages?

Viewing 15 posts - 1 through 15 (of 16 total)
  • Posted in: Joyn
  • #137066
    mhote
    Member
    Post count: 394

    Hi, to decrease load-speed on the homepage and other pages, how can we stop CSS files and JS files loading, unless they are required for us on that specific page. ie:

    1) defer loading go_pricing_styles.css?ver=2.4.2 to only load on pages using gopricing?
    2) defer loading woocommerce.css?ver=2.2.8 to only load on woocommerce element pages
    3) and sf-woocommerce.css
    4) how to remove http://fonts.googleapis.com/css?family=Lato as no longer a used font
    5) and contact form code jquery.form.min.js?ver=3.51.0-2014.06.20
    6) and jquery.flexslider-min.js if not actually using the flexslider plugin
    7) and ilightbox.min.js as not using it
    8) And jquery.infinitescroll.min.js as not using infinitescroll features
    9) and removing many http requests showing data:font/opentype;base64,d09GRgABAA etc

    Thanks!

    #137392
    mhote
    Member
    Post count: 394

    Seem to also be many things loading on home and other pages, that are only needed on specific pages ie… google maps API…

    https://developers.google.com/speed/pagespeed/insights/?url=hoteliyo.com&tab=desktop

    #137398
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #137414
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please use better wordpress minify plugin.
    Thanks
    Mohammad

    #137416
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #137419
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You may also try these plugins https://wordpress.org/plugins/tags/minify.
    Thanks
    Mohammad

    #137479
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #137530
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    1- Please go to Admin -> Theme Options -> Performance Options -> Load pre-minified scripts – Enable this option to load pre-minified scripts, without the need for any plugins.

    2- Google fonts only load when you are logged in wordpress admin dashboard. Its loaded by any plugin.

    Thanks
    Mohammad

    #137625
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #137626
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #137643
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #137789
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    We are not loading any gopricing. On demand feature of js files loading is not currently. We will consider it in future upgrade.

    You can remove google fonts through this script. Just paste this script at functions.php of child theme.

    function sf_enqueue_styles_new(){
    wp_deregister_style('redux-google-fonts');
    wp_dequeue_style( 'redux-google-fonts' );
    }
    add_action('wp_enqueue_scripts', 'sf_enqueue_styles_new', 111); 

    Thanks
    Mohammad

    #137826
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #137834
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You installed Gopricing plugin. So please contact at plugin developer about this issue.
    Thanks
    Mohammad

    #137836
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register