News for hackers. Stuff that matters.
Re:JavaScript Bloat in 2024 by 420698008 on Friday February 23, 2024 @12:35AM (#39477338)
Meanwhile the author has a ton of 1440p images while pegging his website width to 560px

I like the conversation about web performance, but you should make sure you practice what you preach

Re:JavaScript Bloat in 2024 by mrighele on Friday February 23, 2024 @02:56AM (#39478022)
Even if you are not using an high resolution display like the sibling comment says, the images are reasonably sized (they are a few hundreds KB each). I have seen landing pages with 20-30 MB images for no good reason.
Re:JavaScript Bloat in 2024 by guappa on Friday February 23, 2024 @03:31AM (#39478267)
Don't forget the ones with background videos of random diversely raced young good looking models having coffee and looking at screens while nodding.
Re:JavaScript Bloat in 2024 by cyclotron3k on Friday February 23, 2024 @01:46AM (#39477695)
720px actually, but more importantly, 720px is not actually 720px on a HiDPI screen.

I just measured it on my mbp and "720px" is actually... 1440 physical pixels. I was surprised too!

Re:JavaScript Bloat in 2024 by FractalHQ on Friday February 23, 2024 @03:46PM (#39485888)
MBP device pixel ratio is 2 after all!
Re:JavaScript Bloat in 2024 by ustad on Friday February 23, 2024 @02:55AM (#39478019)
The article is related to js bloat and the images are required for the presentation. The images come to 10MB - not bad. The js? 4.5KB!
Re:JavaScript Bloat in 2024 by subtra3t on Friday February 23, 2024 @05:14AM (#39478933)
> required for the presentation

But is such a high resolution really needed?

Re:JavaScript Bloat in 2024 by ustad on Friday February 23, 2024 @12:30PM (#39483570)
Sure, they could have been resized and squeezed through an imagemagick pipeline. But give the kid a break! He speaks the truth.
Re:JavaScript Bloat in 2024 by tgv on Friday February 23, 2024 @03:18AM (#39478170)
Some of my (non-programming) colleagues don't seem to be able to wrap their head around image size. And someone who taught courses to communication/marketing students told me, it took 2 hours to explain resolution and all that to them, and then half even didn't get it. Yeah, I can hear you: "something that easy? must have been a bad teacher," but the concepts are rather weird for non-techies. So those people become responsible for updating the website content, and upload whatever the graphical artists show them. And designers like to zoom in, a lot, so often that's a 20MB png, where a 200kB jpeg would suffice.
Re:JavaScript Bloat in 2024 by devtailz on Friday February 23, 2024 @01:45AM (#39477689)
The images display at 720x720, on a 2x retina screen the image needs to be 1440x1440 to fill that.
Re:JavaScript Bloat in 2024 by Alifatisk on Saturday February 24, 2024 @10:34AM (#39492244)
> I like the conversation about web performance, but you should make sure you practice what you preach

I'd say the author is practicing what he preaches, the JS is just 4,6 kB. There is some optimizations [1][2][3] that can be done to the images but I wouldn't fully disqualify the article because of that. The websocket connection is kinda odd though, I tried reading the code but didn't fully catch the purpose, it just says something about pointers.

[1] https://www.youtube.com/watch?v=uqmgQB5Gyfo [2] https://www.youtube.com/watch?v=uqmgQB5Gyfo [3] https://www.youtube.com/watch?v=hJ7Rg1821Q0