how would I get the browser size in node.js?
I want to send it to a jade template so it can place a unknown amount of divs on the page spaced equally.
if getting the users screen size is not the best way of doing it please let me know a different solution (its probably not the best way. but the only other thing i could think of is a script for each div this.width = window.width/number of divs and that also seems bad).
thanks, Porad
node.js operates on the server side. From there it cannot see the client-size.
Your best bet is going to be to determine this via javascript on the client-side, such that any request, subsequent to the first, will be able to request the correct size.
This won't work if the client has javascript disabled, and for the initial load, so you're going to want to send a sensible default.