To ensure clarity, let me explain the distinctions between document, window, and viewport....
WINDOW refers to the entire browser window, including all navigation bars, etc....
VIEWPORT is the section of the window used to view the current XHTML/HTML/Flash document...
DOCUMENT is the actual content area, similar to the body but includes ALL of the page's content. Only a portion of it is visible at any one time in the VIEWPORT (unless the page is the same size or smaller than the viewport).
While there are numerous solutions for obtaining the VIEWPORT dimensions that I am already familiar with... cross-browser compatibility included.
What I really require is a straightforward, cross-browser method to retrieve the dimensions of the actual DOCUMENT in all browsers (excluding versions older than 3 years).
I recall coming across a great solution here once... long ago... but unfortunately, I cannot locate it now.
Any insights? Thank you for reading and hopefully someone can assist.
P.S. Just to reiterate, I am NOT seeking solutions for calculating the VIEWPORT or WINDOW.
UPDATE: The solution MUST be functional in Opera 10.x, FireFox 3.6.x, IE 7/8/x, Flock 2.x, Safari 4.x... None of the responses below are effective in all browsers....
Therefore, if you have not tested it in all listed browsers, kindly refrain from responding to the question.