Welcome to WebmasterWorld Guest from 54.163.168.15

Forum Moderators: open

visitorís screen size

with multiple monitors

   
6:39 pm on Mar 28, 2006 (gmt 0)

5+ Year Member



I donít have the setup to test this, hence the question:
Letís say that a visitor has two monitors - if you try to get visitorís screen size with JS code
(window.screen.width and window.screen.height) what will the result be? Is it just the size of the area of their browser, data for only one monitor, or data for both monitors combined, or..?
7:54 pm on Mar 28, 2006 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



It would be the same for both, wouldn't it? You can't open a window to be one size in one monitor and a different size in another.
9:08 pm on Mar 28, 2006 (gmt 0)

10+ Year Member



It depends on how the multiple monitors are setup. Each could has different resolution.
9:24 pm on Mar 28, 2006 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Sorry. Misread.
9:34 pm on Mar 28, 2006 (gmt 0)

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



It will be the size of the current application's portion of the desktop. Thus, if you have two monitors with a 1600◊1200 resolution, it is not going to show 3200◊1200, but instead only the resolution for the monitor in which the app currently runs. This can, certainly, as has already been mentioned, be different between the two.
9:37 pm on Mar 28, 2006 (gmt 0)

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Actually ... Just did another test. If you have it set to allow windows to span the two monitors (thus maximizing over both monitors instead of the normal one) it will show the combined total, which in this case can be completely different than the two resolutions combined, as it will take into account dead space from adjusting the desktops height wise.

It also depends on the video card, whether you have only one or two ... and (if one) whether it is capable of treating both monitors as one single desktop internally.

10:10 pm on Mar 28, 2006 (gmt 0)

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member



In Safari Version 2.0.3 (417.9.2) and Firefox/1.5.0.1 under Mac OS X 10.4.5, the monitor size reported is whichever monitor contains the majority of the current window's area.

I suspected it would report whichever monitor contained the upper left hand corner of the window, so the result was quite surprising to me.

1:46 am on Mar 29, 2006 (gmt 0)

5+ Year Member



Thanks for the info and tests; I was especially after the info provided by DrDoc and whoisgregg in the last two posts.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month