[dead]
I think you misunderstood or read past what I was saying.
I wasn't talking about version 4.1, this would have been version 1.x (maybe 1.5... it was ~15 years ago), and the issue was bandwidth usage for uber remote users. There were all sorts of tricks I remember implementing to get that project over the finish line, but one of them was definitely yoinking jQuery out of the project, despite me being a big advocate for the library.
Those original AJAX API's were pretty slick, but not well understood at the time. Surprisingly they could stream characters! The response is partially available each time onprogress fires:
const xhr = new XMLHttpRequest();
let lastLength = 0;
xhr.addEventListener("progress", () => {
const chunk = xhr.responseText.substring(lastLength);
lastLength = xhr.responseText.length;
console.log("New data:", chunk);
});
xhr.open("GET", "/stream");
xhr.send();
-------------------The modern fetch API is better though because it's a Promises API and it can stream as raw bytes, not characters:
const response = await fetch("/stream");
const reader = response.body.getReader();
while (true) {
const { value, done } = await reader.read();
if (done) {
console.log("Finished");
break;
}
console.log("Received", value.length, "bytes");
}
That's why I'm surprised to see still being maintained... ever since Chromium basically won the browser wars and pretty much everything's standardized now, it almost feels like it's lived out its usefulness.
I also want to say I remember it being a bit bloated too. I did work for a client who had several users live in very remote areas where every bit of bandwidth was precious, and I wanted to say that one of the issues was with jQuery. For some reason the "slim" version didn't work for the use case either. This is going off of memory and was probably 15 years ago, so I could be entirely wrong.
There's no denying it's prevalence though. Heck, datatables.net only recently phased out the jQuery dependency in April... of this year!