Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1491517

    Hello, support team,

    In Enfold-child theme there is setting performance – load only used elements (Screenshot 1).
    My website is https://buzaevclinic.ru/
    In google waterfall I see a lot of CSS I do not use (I am sure), (see Screenshot 2.
    For example
    postslider, catalogue, comments, countdown etc.
    Where I am wrong?

    Thank you!

    #1491553

    Hey ibuzaev,

    Thank you for the inquiry.

    Are you using any of the elements on other pages? Please note that the option “load only used elements” only excludes elements that are not used anywhere on the site. Once an element is added to any page, its stylesheets and any related scripts or resources will load across the entire site, regardless of whether they exist on the page or not. Hope this clear things up a bit.

    Best regards,
    Ismael

    #1491573

    Dear Ismael,
    thank you for your fast response.
    I am absolutely sure that I do not use at least catalogue, comments.
    Also if I choose manual selection: Screenshot, you can see the list, that Enfold detects unused modules.
    Could I trust this list and safely set it off manually?
    Anyway, I decided to report this bug, may be I am only one nerd who checked this :)
    Sincerely yours,
    Igor Buzaev
    The co-founder of Buzaevclinic,
    Non-invisive MRgFUS treatment of tremor and Parkinson’s

    #1491574

    Dear Ismael,

    one more feature request:
    near “Disable Mobile CSS Animations” please add Disable all animations (CSS and JS).

    People like me do not use animations at all, but theme wastes time and traffic loading it
    enfold/js/avia-snippet-parallax.min.js
    enfold/js/avia-snippet-fold-unfold.min.js
    enfold/js/avia-snippet-sticky-header.min.js (if not used)

    Enfold is near perfect theme, minimalistic version could add a lot of value (set defaults for all animations to off and do not load scripts).

    Or may be we can do it in functions.php?
    Sincerely yours,
    Igor

    #1491575

    PS.
    1. Ichecked manually disable Available Template Builder Elements Screenshot,
    2. Turned off CSS File Compression And Merging and Javascript File Compression And Merging
    3. Purged all W3Caches
    4. Turned on to compress but not merge: CSS File Compression And Merging and Javascript File Compression And Merging
    5. Purged cache again.
    6. Opened Chrome in private mode and made hard reload with cleaning cache.
    7. Modules still loads (screenshot)

    Sincerely yours,
    Igor

    #1491617

    Hi,

    Thank you for the update.

    I am absolutely sure that I do not use at least catalogue, comments.

    These are loaded because they are required for the default elements in the template, such as the comments section and the catalogue grid for products or related blog posts. Unfortunately, disabling them will affect those elements.

    near “Disable Mobile CSS Animations” please add Disable all animations (CSS and JS).

    To unregister the scripts you mentioned above, add the following code to your functions.php file:

    function ava_wp_enqueue_scripts_mod() {
        wp_dequeue_script('avia-parallax-support');
        wp_deregister_script('avia-parallax-support');
    
        wp_dequeue_script('avia-fold-unfold');
        wp_deregister_script('avia-fold-unfold');
    
        wp_dequeue_script('avia-sticky-header');
        wp_deregister_script('avia-sticky-header');
    }
    add_action('wp_enqueue_scripts', 'ava_wp_enqueue_scripts_mod', 100);
    

    Best regards,
    Ismael

    #1491635

    Dear Ismael,
    thank you for your scripts.

    I see that I do not use other elements also, I disabled them manually: iconbox, masonry, socialshare, gallery, slideshow, but they still are loading!

    1. If the theme offers manually disabling them, why they still load?
    Is it expected behaviour, or we need to report this bug, or there is some problem in my website instance?

    2. Can I try to disable loading CSS with the same approach, you given for the scripts? If I can, could you give me the php commands for that?

    3.

    These are loaded because they are required for the default elements in the template, such as the comments section and the catalogue grid for products or related blog posts. Unfortunately, disabling them will affect those elements.

    I do not have or use these elements at all and do not plan, should I care about affecting them?

    Thank you once again,
    Sincerely yours,
    Igor

    • This reply was modified 2 weeks, 5 days ago by ibuzaev.
    #1491651

    Dear Ismael,
    I tried to unreg CSS by myself (by analogy with your solution):

    function ava_wp_enqueue_styles_mod() {
    wp_dequeue_style(‘avia-module-masonry’);
    wp_deregister_style(‘avia-module-masonry’);
    wp_dequeue_style(‘avia-popup’);
    wp_deregister_style(‘avia-popup’);
    wp_dequeue_style(‘avia-module-slideshow’);
    wp_deregister_style(‘avia-module-slideshow’);
    }
    add_action(‘wp_enqueue_style’, ‘ava_wp_enqueue_styles_mod’, 100);

    But it does not work :(

    Where I am wrong?

    I would like to deregister css:
    /avia-shortcodes/masonry_entries/masonry_entries.min.css?ver=7.1.3
    /avia-shortcodes/slideshow/slideshow.min.css?ver=7.1.3
    /avia-shortcodes/countdown/countdown.min.css?ver=7.1.3
    /avia-shortcodes/tab_section/tab_section.min.css?ver=7.1.3
    /avia-shortcodes/social_share/social_share.min.css?ver=7.1.3
    /magnific-popup.min.css?ver=7.1.3
    /avia-shortcodes/comments/comments.min.css?ver=7.1.3
    /avia-shortcodes/tabs/tabs.min.css?ver=7.1.3
    /avia-shortcodes/iconbox/iconbox.min.css?ver=7.1.3
    /avia-shortcodes/postslider/postslider.min.css?ver=7.1.3
    /avia-shortcodes/gallery/gallery.min.js?ver=7.1.3
    /avia-shortcodes/catalogue/catalogue.min.css?ver=7.1.3

    I found enqueued:
    avia-module-slideshow
    avia_gallery_mode
    avia-module-social
    avia-module-countdown
    avia-module-gallery-hor
    avia-module-tabs
    avia-module-tabsection
    avia-module-timeline
    avia-module-audioplayer
    avia-module-catalogue
    avia-module-chart
    avia-module-slideshow-contentpartner
    avia-module-postslider
    avia-module-testimonials
    avia-module-rotator
    avia-module-slideshow-ls
    avia-module-slideshow-fullsize
    avia-module-slideshow-fullscreen
    avia-module-portfolio
    avia-module-comments
    avia-module-slideshow-accordion
    avia-module-notification

    I also did not find what name to use for:
    magnific-popup.min.css?ver=7.1.3
    masonry_entries.min.css?ver=7.1.3

    #1491718

    Hi,

    Thank you for following up.

    You can’t disable the slideshow, popup and masonry scripts because they are required by the templates, and other default elements on the site depend on them even if no related elements are manually added using the builder. Can you still see the fold/unfold, sticky header, and parallax scripts?

    Are you seeing any other scripts or stylesheets loading aside from the dependencies you mentioned above?

    If you can still see the resources being loaded even after deregistering them using the code we provided above, it means that they are either required by the templates or are used by default elements on the site.

    Best regards,
    Ismael

    #1491801

    Dear Ismael,
    thank you very much, yes, these js has been disabled.

    I do not use countdown now (I used before), but it is still there.
    /themes/enfold/config-templatebuilder/avia-shortcodes/countdown/countdown.min.css?ver=7.1.3

    I also do not use tabs.
    /enfold/config-templatebuilder/avia-shortcodes/tab_section/tab_section.min.css?ver=7.1.3
    /themes/enfold/config-templatebuilder/avia-shortcodes/tabs/tabs.min.css?ver=7.1.3

    Could you give me the commands to disable these css?
    I will experiment with them and see how it works.

    Sincerely yours,
    Igor

    #1491824

    Hi,

    The countdown and the tabs are loaded because they are used by default elements in the page, tabs are used for the widgets and the countdown for the events plugin. As we have mentioned above, if the resources are still loaded even after disabling them using the code we provided above, it means that they are required by the templates or certain elements depend on them.

    If you need to disable the tab section’s stylesheets and scripts, try this code:

    function ava_wp_enqueue_scripts_mod_b() {
        wp_dequeue_style('avia-module-tabsection');
        wp_deregister_style('avia-module-tabsection');
    }
    add_action('wp_enqueue_scripts', 'ava_wp_enqueue_scripts_mod_b', 100);
    

    Best regards,
    Ismael

    #1491843

    Thank you very much Ismael,
    I will play a bit with disabling these css.
    Sincerely yours,
    Igor

    #1491913

    Hi,

    Let us know in a different thread if you have more questions. Thank you for your patience.

    Best regards,
    Ismael

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Load only used elements’ is closed to new replies.