Live data from Hacker News

Responsive JavaScript

responsivejavascript.com

1–10 of 26 posts

Re: Responsive JavaScript

#3
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

#5
post #3

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.

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

#8
post #6

[deleted]

Hm - I don't think the particular example they used (where the function called by onresize just changes a variable) really needs a clear/setTimeout variable.

I see what you mean though, if the function called by onresize was actually making visual changes to the page, the designer would very quickly figure out they need an clear/setTimeout layer.

Re: Responsive JavaScript

#10
"The benefit of this being that we can use the same media queries in the Javascript as we have used in our Javascript."

I guess the second mention of "Javascript" should be "CSS", right?

Post reply on HN