joeyvandijk / rimg

[DEPRECATED] A responsive image solution for browsers that support mediaqueries. Pure javascript and no server-side code.
http://joeyvandijk.github.io/rimg
MIT License
294 stars 25 forks source link

bandwidth detection not implemented or possible #1

Open joeyvandijk opened 10 years ago

joeyvandijk commented 10 years ago

To implement a bandwidth detection setup I have to use extra HEAD-calls (HTTP) to determine the size of the image so I know the download speed at the end of the download. This information is not available after the load-event in Javascript.

I have not done this because every extra call I make will result in more latency especially when mobile or with a very bad signal (GPRS/EDGE and sometimes WiFi).

Any insights by others with cross-browser support or HTML5-compatible browsers?

joeyvandijk commented 10 years ago

I could implement a setup that if images are taking longer than 100ms to load, the next image will, by default, load an image-level lower (from -regular to -medium) for example.

quasiperfect commented 10 years ago

just add it as optional i'm sure there are people who will be using this option