this post was submitted on 17 Aug 2025
6 points (87.5% liked)

JavaScript

2624 readers
11 users here now

founded 2 years ago
MODERATORS
 

Is there any js module for lazy-loading a files content? in vanilla js, (that a import via a script tag), so that if i scroll enough, it will send a request to the server for more of a files content, at a specific chunk of it, and the browser will add the rest of the content to the file viewer/editor

I am making a filebrowser, and so far i implemented navigating folders, uploading files, next I would like to make a file editor, so its not the html page itself I want lazy-loaded, I want a file to be lazy-loaded into the editor, again, so you scroll enough, and it will fetch the chunks from the server (i can figure out the backend bit, I would like it if it worked with multexjs or multipart in rust and I dont have to manually sort out file chunking but thats not a hard requirement.)

Alternative to modules would just be code i can use

top 2 comments
sorted by: hot top controversial new old
[โ€“] not_woody_shaw@lemmy.world 2 points 4 months ago
[โ€“] QuantumTickle@lemmy.zip 1 points 4 months ago