A jQuery-based method for avoiding downloading carousel images until they’re requested:
I’ve implemented something like this before, and would recommend making it fetch the “next” and “previous” images instead of the one actually being requested, to make sure the image is available when it slides onto stage, but an interesting method (using HTML Comments, rather than simply hiding via CSS, which doesn’t work the same everywhere).
The goal was to demonstrate the acceleration benefit (in terms of bytes in, start render time, document complete time, connections, and resources) of each practice for a typical 3G mobile user.
A lightbox is one of those tools that work great on the desktop but often fail on small mobile devices. These days, finding a plugin that is responsive and that displays content right away is hard. For this reason, I created Magnific Popup, an open-source lightbox plugin focused on performance.
Shame they didn’t incorporate touch swipe events…