Hacker News new | ask | show | jobs
by dtorres 5001 days ago
Why not just figure out the pixelRatio once and then serve images according to that?

See this gist: https://gist.github.com/3848834

1 comments

This isn't really good practice, unless you revise your cookie on every page load to make sure it is still correct; e.g. restoring an ipad2 backup to an ipad3 will leave you with the wrong images for the next 10 years.

And an OLPC-style device might have different ratios if you're browsing using the e-ink display rather than the lcd.