[The Channel 46 Lazy Load] Infinite Scrolling with URL Change

I wanted to understand if there is any feature for infinite scrolling & Url changing here. If yes please guide. If no please recommend solutions. If I try to use any other Plugins like Jetpack things conflict with my WPMUDEV plugin and things on my site break. Please help with solution

  • Adam
    • Support Gorilla

    Hello Avinash

    I hope you’re well today and thank you for your question!

    Are you asking if Smush Pro or any other of our plugins can add some sort of “infinite scrolling” option/feature to your site or it’s the problem that Smush doesn’t work for you with the images that are loaded during infinite scrolling?

    If it’s the first one – no, Smush Pro is strictly an image optimization plugin and it doesn’t bring any infinite scrolling feature to the site. We don’t have any other plugin that would provide it as well.

    Personally, I used this plugin to add infinite scroll to some sites in the past and it worked quite nice but I admit it was years ago so I’m not quite sure how the plugin performs now:

    https://wordpress.org/plugins/ajax-load-more/

    It’s free, though, and has over 50 000 active installs with 5-star rating so it seems like a nice solution. Any “infinite scrolling” however, might possibly interfere with any lazy load in fact. On the other hand, though, parts of content loaded via infinite scroll they don’t really need lazy load for images.

    If I try to use any other Plugins like Jetpack things conflict with my WPMUDEV plugin and things on my site break.

    In JetPack there are two settings related to images that might, and usually do, interfere with Smush Pro. One is “Speed up image load times” which, just like Smush CDN, attempts to serve images from CDN – just different one. If both plugins try to do it at the same time, that would lead to conflicts. The other one is Lazy Load which Smush Pro also has built-in so, similarly, if Lazy Load is enabled in both plugins it can conflict.

    This is pretty much the same with many other plugins, not only ours, that if they provide same or similar options and these options are active on site at the same site – conflict happens. That’s why it’s important to make sure to keep “overlapping” options of various plugins enabled in only selected ones.

    That’s about Smush Pro as I understand this is our plugin you are referring to. If you got follow-up question or I misunderstood anything or missed something – please let me know and I’ll be glad to assist you as much as you need.

    Kind regards,
    Adam

  • Avinash
    • Flash Drive

    Hey Adam,

    Appreciate the response. I tried the plugin you have mentioned above. Ajax Load More but the issue is the URL changing. I can’t get it to work for URL changing. I have Infinite Loading on my theme as well but the issue is changing the URL when a new article loads after the end of the initial article.

    Thanks
    Pakshal

  • Adam
    • Support Gorilla

    Hello Avinash

    Thank you for your response!

    I’m still not sure, though, if I understand the issue correctly.

    I have visited your site and opened some randomly chosen article (in “healh” category – the “7 Impressions Home….”:wink: and I started to scroll the page down. I could see that there are next articles added over and over as I scroll the page down. So that would mean that infinite scroll feature is working there.

    But I’m confused about the URL part. Currently, new posts are being added to the page upon scroll but the URL in browser remains the same. Is this the problem? Would you like the URL to change “dynamically” to match the article that’s within the viewport (visible area) at any given point?

    If yes, it’s not the common case. The way it works now is the way it should work. The URL in browser can’t really be changed that way unless the page itself is changed to different one (so that would mean no more “infinite load” but just standard load). That’s also why in most cases such “infinie load” us usually used on archive pages (article/blog listing pages) rather than on “single post” pages.

    There might be a way to “trick” browser to change the displayed URL, using additional JS code but I’m not sure how this would work with modern browsers (I mean, I remember that being possible few years ago, with older browsers) as there are quite strict security mechanisms implemented against any “spoofing”/”cloacking” attempts that could, theoretically, be considered as “deceptive”.

    I’m not aware of any “infinite load” plugin that would do this (though I admit I don’t know all of them). I believe that if that’s possible at all now, you would need to get it custom coded for you so you might consider hiring a developer as it would be outside the scope of this support forum.

    Kind regards,
    Adam