Skip to content

24 ways to impress your friends

Vote down?

James Pearce

It’s worth binding size-queries to the document’s load event (or even, in some cases, to a point some time after that).

On Android v2.3 for body.clientWidth, for example, (and other platforms, if there are different measurements you’re querying), these values can change radically during the page’s lifecycle.

There’s data here