Difference between screen and window property?
asp.net, javascript, web-applications
Solution
`screen` is actually `window.screen` since `window` is the context for globals.
A `window` object (obtained through `document.defaultView`) returns information about both the window and the viewport. To get the application window size use `window.outerHeight`, to get viewport size use `window.innerHeight`.
The `screen` object refers to the actual monitor window or desktop size. Note that if you have a multi-mon setup then you will have multiple `screen` objects. A `window` object belongs to a single `screen`, though not very `window` belongs to the same `screen`. I do not know what happens when a browser window spans multiple `screen`s.
From all this, you can determine that if you are running a full-screen browser then `window.outerHeight == window.innerHeight == screen.height`.
Source: https://developer.mozilla.org/en-US/docs/DOM/window.screen and https://developer.mozilla.org/en-US/docs/DOM/window
Problem
In my Web application , am in need to use the browser window's Height & Width. So I used Screen.Width , Screen.Height properties in JavaScript to get the Width & Height. While am surfing I got another property as Window.Width , Window.Height. Can anyone tell me , which property gives me the Size of Browser window.....Screen (or) Window ?