tri_inn

tri_inn

  • NA
  • 1.2k
  • 223.6k

Infinite Scroll and page crash issue

Mar 18 2015 5:07 AM
i use jquery for infinite scroll. i just invoke my page method by jquery and page method return data in json format which jquery parse and jquery push those data into div and append that div in page. when user scroll to end of the page then loading data. so this way user scroll and scroll to read data and jquery just append the div in the page again and again which make heavy the pages and this cause my page slow and some time crash.
 
so guide me how to develop infinite scroll as a result my page would not be slow and crash?
 
i guess if i could remove div from my page when it goes out of viewport but if user again scroll upward then again i need to load that data and append in the page. this logic is getting tough for me to design whole things. so anyone can help with code sample to implement this or redirect to me any code sample or write up which help me to do this.
 
looking for guidance. thanks