Share your repls and programming experiences

← Back to all posts
incremental loading on scroll
h
rafrafraf (305)

this is a simple socket server and client that requests the next 10 data items as you scroll rather than loading all of it at once, this is useful when you need to request a large amount of data as it would not show any data until it is all loaded in

the example is 500 strings stored in the server

as you scroll, the client requests the next 10 data items and creates elements to show them on the page

the client only makes a request once you scroll below the bottom data element on the page