you need a js lib for detection, then change image via html later. hows that now the retina.js setup?
Taylor Bernard on August 5, 2015:
i thought i linked that one you just sent over earlier. its just using the pixel ratio trick to see if its retina. i think it may have a known bug though, not that it matters, but i think on some browsers, if you try and zoom. it changes 'pixel ratio' to be higher in a way, thus not true pixel ratio,
Comments
Taylor Bernard on August 5, 2015:
Justin Bernard on August 5, 2015:
Taylor Bernard on August 5, 2015:
Justin Bernard on August 5, 2015:
Taylor Bernard on August 5, 2015:
looks like all retina devices are pixel ratio 2. thats what that '1, 1.5, 2' ect in the pixel ratio is in the css.
Justin Bernard on August 5, 2015:
Taylor Bernard on August 5, 2015:
Taylor Bernard on August 5, 2015:
looks like this is the way to go. loads it first and is more powerful.
pretty neat trick.
http://stackoverflow.com/questions/4117555/simplest-way-to-detect-a-mobile-device
Justin Bernard on August 5, 2015:
so stuff will be loaded via css, then with user interaction/with js i can change images if need be later on
Justin Bernard on August 5, 2015:
found it
http://stackoverflow.com/questions/19689715/what-is-the-best-way-to-detect-retina-support-on-a-device-using-javascript
Taylor Bernard on August 5, 2015:
Taylor Bernard on August 5, 2015:
i think it may have a known bug though, not that it matters, but i think on some browsers, if you try and zoom. it changes 'pixel ratio' to be higher in a way, thus not true pixel ratio,