• Resolved Abid

    (@hussain76)


    On our site there’s an ALM container which is the last section above the footer. It becomes visible when scrolling down to the bottom of the page.

    Although this section isn’t initially visible in the viewport, the Ajax request is sent straight away and the posts are loaded.

    Is there a way to prevent this so that the posts are only loaded when the container becomes visible in the viewport?

    I played around with the scroll_distance param with no success. In the examples there’s a undocumented preloaded param, but setting preloaded="false" didn’t have any effect.

    This is our shortcode:

    echo do_shortcode('[ajax_load_more max_pages="3" offset="' . $offset_for_rest . '" posts_per_page="10" loading_style="white" scroll="true" category__and="1" button_label="Mehr laden" button_loading_label="Laden ..."]');

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Abid

    (@hussain76)

    Just a follow-up: I saw that the wanted functionality seems to be provided by the Preloaded Add-On. Am I right? If yes, the next question would be: to minimize database workload, which Add-On would you recommend – Preloaded or Cache (we use caching of static HTML pages already)?

    Plugin Author Darren Cooney

    (@dcooney)

    Hi @hussain76,

    Preloaded would likely be your best bet. If you get a ton of traffic the Cache add-on would be a nice next step to reduce HTTP queries.

    Hope that helps!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to prevent initial preloading’ is closed to new replies.