简体   繁体   中英

Rails kaminari infinite scroll : 7 get requests to load 1 page

I am new with kaminari (ruby) and I just implemented the kaminari infinite scroll. I followed the tutorial step by step and I noticed that the JQuery makes 7 get requests to load one page whitch is a lot. I think it's a bug. How can we lower this to one call ?

You will find here the JQuery code https://raw.githubusercontent.com/paulirish/infinite-scroll/master/jquery.infinitescroll.js

Thanks !

I finally implemented this tutorial with kaminari (instead of will paginate) : http://www.sitepoint.com/infinite-scrolling-rails-basics/ . FYI, there are 2 or 3 adaptations to perform to make that tutorial work with kaminary. Ask me if you want to know more about that. after that, it works just fine on smartphones and consumes very low ressources client-side.

V.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM