Preloader animation only for specific pages

13 replies3 participantsUpdated by Jack Richardson

  • Avatar: kikjou
    Martin
    Participant

    Hi,

    I wonder if it is possible to restrict the preloader animation so specific pages.

    Most of the pages are in the page cache and load quickly. However, cart, checkout etc. cannot be cached.

    That’s where the preloader animation would be very useful

    Best regards
    Martin

    13 Answers

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff

    Hello, Martin,

    At the moment, it is not possible to disable the animation placeholders on specific pages. Please submit a request to add this functionality on the following board: https://www.8theme.com/roadmap/

    Best regards,
    The 8Theme Team

    Avatar: kikjou
    Martin
    Participant

    Hi,
    do you think it might work, if I disable the preloaders asset files (js and css) on all but those specific pages?
    I would need to know which ones those are.

    Best regards
    Martin

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff

    This approach may work, however, these are general style files, and disabling them could affect the appearance of the pages. The outcome depends on which elements are used on the pages.

    Best regards,
    8Theme Team

    Avatar: kikjou
    Martin
    Participant

    Hello,

    then it becomes really necessary to fix the issue with the preloader. It snaps in too late. This becomes apparent with page caching: the page has almost loaded when the preloader appears.

    Best regards
    Martin

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff

    Please send us the links to the pages where we can see a this issue.

    Best regards,
    8Theme Team

    Avatar: kikjou
    Martin
    Participant

    Hello,

    I have switched on the preloader animation.

    You can try any page that is not in the cache. You should find not yet cached products here https://www.pflanzkompass.at/stauden/page/36/ or somewhere farther down the archive pagination.

    With cached pages the preloader appears right away, but non-cached start loading and only at the end, when most of it is done, the preloader appears.

    Best regards
    Martin

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff

    Thank you for the link. We have made some adjustments, and the loader now looks better. Please review the attached video.

    Best regards,
    The 8Theme Team

    Files is visible for topic creator and
    support staff only.
    Avatar: kikjou
    Martin
    Participant

    Hello,

    thank you! But I can’t see much difference. What exactly should have changed?

    The main problem seems to be, that the browser first connects to the server, takes its time as typical with slow servers, and only then loads the animation with first paint. So the preloader animation displays only for a short time after much of the loading has already happened.

    Best regards
    Martin

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff

    Hello, Martin,

    We have modified the style loading order to ensure that the animation starts faster and have also disabled the delay before the animation restarts. However, you are correct that the animation will not begin until all the necessary resources are fully loaded. Therefore, the server response speed plays an important role in this process.

    Additionally, we can suggest using the global Site Preloader. To enable it, please go to the Customizer → General / Layout → Site Preloader section.

    Best regards,
    8Theme Team

    Avatar: kikjou
    Martin
    Participant

    Hello,

    I am not sure what you mean by “global site preloader”. In the mentioned location there is only the discussed preloader animation, see screenshot.

    By the way, would the “flying pages” conflict with w3total cache (page caching on, any preload requests off)?

    Thank you
    Best regards

    Files is visible for topic creator and
    support staff only.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff

    Hello @Martin,

    You should have several options available for loaders: https://prnt.sc/eeX-U1LVkJWz.

    Regarding your question about the potential conflict between the mentioned option and the caching plugin, please note that if you are using a caching plugin, it is recommended to disable the Flying Pages option.

    Best regards,
    8Theme Team

    Avatar: kikjou
    Martin
    Participant

    Hello,

    thank you, I am aware of the options for the preloader. What I am looking for, is a way to specifically enable it only on certain pages but disable it for others – for most, actually. I would prefer it show only at “cart”, “checkout”, “thank you page”

    How can I achieve this?
    Thank you!
    Martin

    Avatar: Jack Richardson
    Jack Richardson
    Support staff

    Hello @Martin,

    Unfortunately, it is not possible to enable the site preloader for specific pages only. The desired result can be achieved by enabling the preloader globally and then using custom CSS to hide it and displaying it only on some specific pages. For example, to display it only on the cart, checkout, and thank-you pages, you can use the following code:

    body>.et-loader {
        display: none;
    }
    
    body.woocommerce-cart>.et-loader,
    body.woocommerce-checkout>.et-loader {
        display: block;
    }

    Best regards,
    Jack Richardson
    The 8Theme’s Team

Want to reply? Log in, or register with your ThemeForest purchase code, to reply to this topic.

Login / Register