Welcome to WebmasterWorld Guest from 54.205.106.138

Forum Moderators: open

Message Too Old, No Replies

visitorís screen size

with multiple monitors

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

Preferred Member

10+ Year Member

joined:Feb 10, 2006
posts:627
votes: 0


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)

Senior Member from US 

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

joined:Oct 17, 2005
posts:4993
votes: 14


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)

Full Member

10+ Year Member

joined:Feb 24, 2004
posts:219
votes: 0


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

Senior Member from US 

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

joined:Oct 17, 2005
posts:4993
votes: 14


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

Senior Member

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

joined:Mar 15, 2002
posts:6807
votes: 0


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)

Senior Member

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

joined:Mar 15, 2002
posts:6807
votes: 0


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)

Senior Member from US 

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

joined:Dec 9, 2003
posts:3416
votes: 0


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)

Preferred Member

10+ Year Member

joined:Feb 10, 2006
posts:627
votes: 0


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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members