How to detect full html page height (size) using JavaScript?

How to detect full html page size: height, using JavaScript?

Just use this script

var body = document.body,
    html = document.documentElement;

var height = Math.max( body.scrollHeight, body.offsetHeight, 
                       html.clientHeight, html.scrollHeight, html.offsetHeight );

Insert into your code