1.11M Members

Detect if browser window is maximized or not

 
0
 

Hello

Now that I know how to get the width/height, how can I detect if the browser is maximized or not?

Crossbrowser of course.

Thanks

 
0
 

You can check if the screen width/height is the same of the window width/height.

Actually you have to use screen.availHeight to get the screen height without the taskbar.

Something like this(not tested):

if ( screen.height == window.height ) { // FullScreen Mode

}
else if ( screen.availHeight == window.height ) { // Maximized

}
else { // Other size

}
You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article