News for hackers. Stuff that matters.
Re:Responsive JavaScript by wwweston on Tuesday February 11, 2014 @03:23PM (#7220143)
I can see the appeal, but I wonder if this might not be better accomplished with an HTTP header that would explicitly give the viewport dimensions and/or some information about the connection type/speed.
Re:Responsive JavaScript by jitl on Tuesday February 11, 2014 @03:30PM (#7220197)
Viewports can change in size once the page has loaded. A Connection-Quality: GPRS, 512kbps; header would be nice. But then you still get an issue when phones must report or the user toggles on WiFi as soon as they see a few bad (low bitrate) assets.
Re:Responsive JavaScript by hayksaakian on Tuesday February 11, 2014 @06:46PM (#7221448)
Its more simple than that, imagine I rotate my screen.

Do now need to send every possible view port with the original header?

Re:Responsive JavaScript by wwweston on Friday February 14, 2014 @12:38AM (#7237120)
Yeah, suggesting viewport dimensions was a lazily considered and unfortunate choice on my part. Screen dimensions -- probably in particular the larger device width -- would be better, and now that pixel density is an issue, that as well.
Re:Responsive JavaScript by paulirish on Tuesday February 11, 2014 @06:48PM (#7221463)
That's the thrust behind the Client Hints proposal: https://github.com/igrigorik/http-client-hints