Better HN
topnewbestaskshowjobs
Log inSign up

dwnoiz

4 karma · joined Mar 29, 2012 (14y ago) · 2 submissions

Submissions

comment 14y ago · link · parent

Check this way of doing it to avoid extra http requests. http://www.archer-group.com/2012/development/javascript-jque...

comment 14y ago · link · parent

While this script is fine, it adds an extra HTTP request per image to check for a retina version of the image. Also, the browser will start downloading the small version before it loads the big version (adding another extra http request). Check this easy jQuery snippet that does the same thing, but avoids these issues:

http://www.archer-group.com/2012/development/javascript-jque...