Solution
var height = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); var width = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
Example
This example shows the dimensions of your current browser window in real-time. Resize your browser to see the updated actual dimensions:
Height:
Width: