Browser bugs with Javascript screen size constants
Test script follows...
-------------------------------------------------------------------------------------
<!DOCTYPE html>
<body><script>
document.write('NB: These are CASE SENSITIVE constants!'+'<br><br>');
document.write('screen.width : '+screen.width+'<br>');
document.write('screen.height : '+screen.height+'<br><br>');
document.write('screen.availWidth : '+screen.availWidth+'<br>');
document.write('screen.availHeight : '+screen.availHeight+'<br><br>');
document.write('window.innerWidth : '+window.innerWidth+'<br>');
document.write('window.innerHeight : '+window.innerHeight+'<br><br>');
document.write('window.outerWidth : '+window.outerWidth+'<br>');
document.write('window.outerHeight : '+window.outerHeight);
</script></body>
-------------------------------------------------------------------------------------
Test results:
-------------------------------------------
Under Maxthon3 my screen returned:
screen.width : 1024
screen.height : 768
screen.availWidth : 1024
screen.availHeight : 738
window.innerWidth : 1024
window.innerHeight : 626
window.outerWidth : 1016 <--Smaller than 1024 makes no sense!
window.outerHeight : 730
--------------------------------------------
Under Firefox 16 my screen returned:
screen.width : 1024
screen.height : 768
screen.availWidth : 1024
screen.availHeight : 738
window.innerWidth : 1024
window.innerHeight : 605
window.outerWidth : 1032 <--Should be 1024
window.outerHeight : 746
-------------------------------------------
Under Sea Monkey my screen returned:
screen.width : 1024
screen.height : 768
screen.availWidth : 1024
screen.availHeight : 738
window.innerWidth : 1024
window.innerHeight : 591
window.outerWidth : 1032 <--Should be 1024
window.outerHeight : 746
-------------------------------------------
Under IE6 (forget it!) only the first 4 are supported.