Hi, and thank you for your great job.
I've a problem.
I've insert the retina script in my web page.
When in my webpages there are the @2x image on the same folder of the standard image there aren't problem and the script work very well.
But if i don't have the image (@2x) on folder, the script don't show the normal image.
FOLDER > image.png + email@example.com (WORKS)
FOLDER > image.png (Don't show the image standard )
There are a solution?
@paoloandrea Do you have a link or example code of where this is happening?
i've simulated the error.
You can see it on office.azero.it/retina
and download the zip full code at office.azero.it/retina/retina.zip
Thank you for help me.
I've noticed this happens when using hosting such as http://staticloud.com/, because they do not return a proper 404 response when a file isn't found. They instead just return a page indicating that the page could not be found, but the response is 200.
Example '404' page:
$ curl -I http://ciclismo.staticloud.com/kjskldjld
HTTP/1.1 200 OK
Date: Wed, 22 Aug 2012 17:29:59 GMT
Content-Type: text/html; charset=utf-8
Set-Cookie: sessionid=92035ab79247950b011a4084217e550b; Domain=.staticloud.com; expires=Thu, 22-Aug-2013 17:29:59 GMT; Max-Age=31536000; Path=/
Set-Cookie: sessionid=a2cea44f070eebdf9498e4bee053c87e; Domain=.staticloud.com; expires=Thu, 22-Aug-2013 17:29:59 GMT; Max-Age=31536000; Path=/
Because it returns a 200, retinajs thinks the image is actually there, and tries to load it in.
After reviewing the example created by @paoloandrea, I think that my problem is linked as I use TimThumb to dynamically generate the required images, i.e. no retina images are loaded and no normal resolution images either.
This issue does seem to be caused by odd hosting behavior. Closing.