No need to bring JavaScript into it.
In HTML, use `<picture>`: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...
In CSS, use `image-set()`: https://developer.mozilla.org/en-US/docs/Web/CSS/image/image....
https://news.ycombinator.com/item?id=44298656
You might be getting 100 Mbps to your smartphone; many people – yes, even within the United States – struggle to attain a quarter of that.
PNGs for line art and text, JPEGs for photorealistic images.
> When I came up in the IE era
In the IE era I recall, the battle was between GIF and JPEG because IE supported alphatransparent PNGs very poorly :)
> if I recall correctly JPEG as a format can encode an image with a higher fidelity than PNG
The other way around: JPEGs are “lossy” – they throw away visual information to save file size. PNGs, on the other hand, are “lossless”, and decode back to exactly the same pixels that were fed into the encoder.
I stopped recommending Signal to nontechnical folks due to the inability to back up messages on iOS. People are pretty protective of their message history, and having everything tied to a single device with no recourse for backups is a nonstarter.
The slightly longer version of the story is that my wife, travelling alone, had some trouble with an iPhone update (it hung for hours), and so she took it to the nearest Genius Bar; they eventually got the update to apply, but then did a factory reset “just to be safe”. Of course, everything except her Signal message history was restored from the automatic iCloud backups. She was devastated, and refuses to touch it now.
Please do not reply to say this was the fault of the Apple Store employee. It was, but at the same time, it also very much wasn't.