News for hackers. Stuff that matters.
Re:Sucking at Retina by kevingadd on Monday January 07, 2013 @03:08PM (#5022923)
"And yet, the internet is still having a hard time adopting. Startups slave for months meticulously designing their new marketing site and are completely oblivious that, to people on a Retina display, it looks like a jumbled pixelated mess."

Or maybe they don't care enough about a tiny fraction of their market to create assets at dramatically higher resolution just to prevent customers from feeling a slight amount of buyer's remorse when they look at their display with a magnifying glass?

Maybe they'd rather have pages load faster for all their customers, instead of serving up needlessly huge image assets to every user? It's not like the WHATWG and W3C have solved this problem yet, they're still bickering over whatever the latest solution is (I don't even know whose fault that is at this point, what a mess)

I still find it incredibly hilarious that owners of Retina macs bitch at content creators because their content looks 'pixelated' when Apple is still too lazy to even run a bilinear filter when upscaling the framebuffer. What is this, 1993? Windows has been able to do this since desktop composition was introduced in Vista.

Re:Sucking at Retina by FredFredrickson on Monday January 07, 2013 @03:19PM (#5022980)
Totally agree.

Also, while we're at it, can we stop referring to these high-density displays by the idiotic marketing term, "Retina"?

Re:Sucking at Retina by reidmain on Monday January 07, 2013 @03:10PM (#5022934)
This isn't just for those people running Retina MacBook Pros. iPhone 4 and up, iPad 3 and up and certain Android devices would benefit from Retina assets.

It's not a tiny fraction of the market.

Re:Sucking at Retina by kevingadd on Monday January 07, 2013 @03:14PM (#5022961)
Are you honestly suggesting that it's worth doubling the size of all your assets over the wire, making pages load even slower on mobile, just to make them look high-DPI for people on retina devices?

Again, if it were easy to feature-detect reliably and only serve the bigger assets up to people on retina devices, I might agree with you.

I've got a high-DPI device and I prefer fast-loading pages every day. If I want things to look incredibly crisp I'll zoom out. Text still looks great!

Re:Sucking at Retina by acdha on Monday January 07, 2013 @03:46PM (#5023146)
> Are you honestly suggesting that it's worth doubling the size of all your assets over the wire

a) it's nowhere near 4x unless you are using uncompressed images. With something like PNG compression most of the difference is negligible and there've been some interesting experiments showing that with JPEG trading resolution for quality is roughly break-even: see e.g. http://alidark.com/responsive-retina-image-mobile/

b) Even on mobile, latency is WAY more of a factor than bandwidth. If pages load slowly, it's almost always the case that reducing the number of CSS / JS files will help significantly more than reducing image sizes.

c) One of the approaches for dealing with DPI variance is to replace images with vector / webfont / CSS alternatives which don't require scaling. If you do that, you're also going to significantly reduce the total asset size for the page which is going to help everyone get a faster time to paint.

Re:Sucking at Retina by nwh on Monday January 07, 2013 @03:19PM (#5022983)
Loading a page with normal assets and then replacing them with double-resolution ones with JavaScript doesn't seem ridiculously bad to me.

Pages still load as they normally would, and then become progressively clearer. Set a cookie, and all subsequent loads can be sent with only retina quality images.

A little fragile, but it works.

Re:Sucking at Retina by kevingadd on Monday January 07, 2013 @03:20PM (#5023002)
That seems like it could work pretty well as long as you can reliably detect that a browser's display is high-DPI. Can you do that? The last time I checked, it's not possible to reliably detect a high-DPI display or force the page to render at a certain DPI level - Chrome used to have a meta viewport attribute for it, but it was removed.

I'd love to see a JavaScript library that does this; I've never run across one.

Re:Sucking at Retina by nwh on Monday January 07, 2013 @03:22PM (#5023011)
You can just read 'window.devicePixelRatio' using JavaScript. Retina devices will be more than one.
Re:Sucking at Retina by kevingadd on Monday January 07, 2013 @03:27PM (#5023038)
That's cool, I didn't realize you could use that in production yet but it looks like (other than some weird caveats) you can: http://www.quirksmode.org/blog/archives/2012/07/more_about_d...
Re:Sucking at Retina by igravious on Monday January 07, 2013 @03:40PM (#5023117)
Quadrupling, surely?
Re:Sucking at Retina by furyofantares on Monday January 07, 2013 @04:15PM (#5023301)
Probably somewhere in-between on the assumption that compression can do a better job on bigger images.
Re:Sucking at Retina by Le_SDT on Monday January 07, 2013 @03:19PM (#5022990)
I think the best solution would be to only use CSS. You can do pretty much everything with CSS so that would be the best way to ensure the perfect resolution for everyone... but there will always be exceptions
Re:Sucking at Retina by kevingadd on Monday January 07, 2013 @03:25PM (#5023024)
Can you use CSS media queries to detect the display's DPI? I haven't seen any examples of that.

You can at least detect the 'device pixel ratio', which seems to be > 1.0 for Retina devices, so that's something:

http://stackoverflow.com/questions/11722442/is-there-a-way-t...

Re:Sucking at Retina by lancer383 on Monday January 07, 2013 @03:55PM (#5023199)
Not sure how well adopted it is, but Bourbon CSS's mixin for serving Hi-DPI assets includes DPI-based media queries:

    @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
    only screen and (min--moz-device-pixel-ratio: 1.5),
    only screen and (-o-min-device-pixel-ratio: 1.5/1),
    only screen and (min-resolution: 144dpi),
    only screen and (min-resolution: 1.5dppx) {
      width: 260px;
    }
Re:Sucking at Retina by cstejerean on Monday January 07, 2013 @03:36PM (#5023098)
Device pixel ratio in CSS is how I've seen every website implement retina support. Definitely possible, and not at all uncommon.
Re:Sucking at Retina by rayiner on Monday January 07, 2013 @03:52PM (#5023182)
Almost all the higher-end mobile devices have high-DPI displays now. All the flagship Android and Win 8 phones, and even many of the mid-range ones. Heck, even the Blackberry 9900 has a high-DPI display.
Re:Sucking at Retina by SCdF on Monday January 07, 2013 @04:05PM (#5023254)
I guess it depends on who your market is. Perhaps if you're github or something you might want to care.

If you're "Your Local Newspaper" where local is not in California or some other American tech mecca? I don't think you need to care yet...

Re:Sucking at Retina by bjustin on Monday January 07, 2013 @04:19PM (#5023320)
By mid 2014, I expect Apple to sell retina versions of all of their laptops. It is still some ways off, but then when will you adapt your site for retina? When 20% of your market has retina laptops? By then, you have established to that 20% that you don't care about polish[1]. Especially for developers, they are that much less likely to recommend you to their friends.

You can find (someone else's) better argument along similar lines at [2].

[1] I'm exaggerating, a bit.

[2] http://www.red-sweater.com/blog/2568/target-the-forward-frin...

Re:Sucking at Retina by kevingadd on Monday January 07, 2013 @04:42PM (#5023440)
Trading page load time and bandwidth usage for crisper pixels is not exactly what I would call polish.