3 ms·
this solution does not work as domload is executed way too late and image replacement cause nasty reflow. RWD images problem is much more complicated than this
by gondo 13y ago
this solution does not work as domload is executed way too late and image replacement cause nasty reflow.
RWD images problem is much more complicated than this.
you have to consider things like:
- dom reflow (img tag without width/heigh)
- requests (additional request to load default image)
- internet speed (you can use wifi on your phone, or 3g on laptop)
- choosing breakpoints
i wrote a blog post about this some time ago http://gondo.webdesigners.sk/responsive-images/ http://gondo.webdesigners.sk/responsive-images/
apparently i'm not the first one thinking about using base tag. i've come across some old video (dont remember the link anymore) where it was refused because of "browser bug". unfortunately i never found out what bug is the guy referring to so i can just assume that it was already fixed.