not able to get and store screen resolution <p>I am using following code to save screen-resolution in cookie</p> <pre><code>var the_cookie="screen_resolution="+screen.width+"x"+screen.height+";expires="+today.setDate(today.getDate()+1); document.cookie=the_cookie; </code></pre> <p>But some-how, it not working on browsers like IE 7 and 8.</p> <p>Any idea, why it's not working? Is screen.width and screen.height don't retrieve screen-resolution on all browsers, or they have browser dependencies. </p>