Automatic Conditional Retina Images

Shaun Inman:

One line of JavaScript and a few mod_rewrite rules and we have no fuss Automatic Conditional Retina Images.

Shaun Inman posted a solution to automatically load retina images if you are using a retina device. His solution is to set a cookie and then automatically serve the 2x images with a fallback to the normal ones of course. Seems like a nice and easy way.

So far I only added retina images as background images and had no problem thanks to media queries. But this is a nice way for inline images like photographs without serving the big ones to a non-retina device.
Sadly it doesn’t work in Firefox at the moment.