Forum Moderators: open

Message Too Old, No Replies

jQuery "infinite scroll"; third party or home grown?

         

csdude55

2:54 am on May 11, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm hoping you guys can help me to make a decision here.

First decision:

I'm working mostly with classified ads. They automatically expire after 2 weeks, and I have them broken down into several categories, but it's still not uncommon for there to be 2,000 ads in a single category.

I currently have the list paginated, where the user can choose to show 25, 50, 100, or all on a single page.

In the interest of generating more pageviews, though, I've been working on setting up infinite scroll. The theory is to load 15 ads at a time so that the page loads faster, and set the next page to load when it's within 1000px so the scrolling would be virtually seamless to the user. But they would be more likely to scroll down farther than to click "Next" to see the next page.

And I figure that if it doesn't go over well, I could always go back to the original and just use infinite scroll when the user chooses "View All".

So from your experience, should this go over well, or am I totally wasting my time?

Second decision:

With the naive idea of saving some time, I'm trying to use a third-party system for the infinite scroll. I've been using jsdelivr.com to find a program to use. First, I used jScroll (jscroll.com), because it came up first in the results and seemed easy to implement. But it has problems:

1. It doesn't seem to work at all on mobile, which defeats the purpose. I'm using jquery-2.2.4.min.js and jquery.mobile-1.2.1.min.js, but when I use jScroll on mobile it gets to the bottom of the page and just dies, without showing the backup Next button.

2. When it scrolls to the second page it doesn't change the address bar, so I'm not sure how search-engine friendly it is, anyway.

Next, I tried Infinite Ajax Scroll (infiniteajaxscroll.com). But:

1. It doesn't work on mobile, either, and also hides the "Next" button. Maybe related to the older versions of jQuery I'm using? But newest versions messed up some of my formatting, and these were the only versions that didn't do that.

It IS search engine friendly, though, which is great.

So, assuming that you guys agree that I should even keep the infinite scroll... the decision is whether to keep looking for a third-party app, or roll my own. Which would you guys recommend?

NickMNS

3:15 am on May 11, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Have you seen these post from Google on the topic? It covers everything you need to know and includes code examples. But it is not for the faint of heart.
[developers.google.com...]
[webmasters.googleblog.com...]

csdude55

5:43 am on May 11, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I had read the second one, but was concerned that it was dated in 2014 which may mean that it's no longer relevant. I hadn't seen the first, though.

You're right, it's not for the faint of heart! Which is why I was really hoping to find a third party program. I would happily pay for one, I just need something that is reliable and actually works! lol And I'm not eager to spend the next month (or more) learning a complex, complicated system that I'm only going to need once.

** Just as an FYI, I tried updating my jQuery and jQuery mobile to newer versions, but IAS still didn't work on mobile. I haven't tested jScroll yet.