
Responsive background images with JavaScript - jpap
https://www.jpap.org/blog/2017/04/responsive-background-images-with-javascript/
======
jerryszczerry
> Take, for example, the awesome 404 page over at Disqus. They use a random
> animated GIF from popular TV and film,

An excellent idea! As if we didn't have other ways of wasting bandwidth…

~~~
jpap
My reference to "awesome" was in the sense of being fun.

You could, of course, use a highly-compressed video instead, as some other
sites do. Further, Disqus puts this animated GIF on their 404 page, which
should, if everything goes well, be infrequently visited by users -- and
bandwidth not sprayed needlessly across the web.

In any case, the technique is equally useful for still images and was
originally designed for the JPEG background on my homepage. That background
also makes use of the new responsive img "srcset", which makes it further
optimized for mobile users than using one JPEG for all.

