7

I want to get the window height and width including Address bar , status bar,etc...

How can I get the window full height and width as shown in the picture below ?

enter image description here

Note : I know about the window.innerHeight and window.innerWidth . It does not suits for this scenario. window.innerHeight is used to get the DOM height only.outerWidth also does not gives what I have want.

Hope our stack users will give a good solution with cross browser compatibility.

Human Being
  • 8,269
  • 28
  • 93
  • 136
  • Jquery can be a solution. Read this answer http://stackoverflow.com/questions/2596594/jquery-window-width-and-window-height-return-different-values-when-vie – mirmdasif Apr 08 '14 at 06:47

2 Answers2

17

use this if you want without scrollbars etc.. :

window.innerHeight; // for height

window.innerWidth; // for width

else in your case, if you want it full, use the below.

window.outerHeight; // for height

window.outerWidth; // for width
Amit Joki
  • 58,320
  • 7
  • 77
  • 95
-1

How about using jQuery Fiddle

$(window).width();

$(window).height();

Source jQuery Window Width

Rakesh Shetty
  • 4,548
  • 7
  • 40
  • 79