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

Crossbrowser of course.


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

This article has been dead for over six months. Start a new discussion instead.