Get the whole document's html with JavaScript/JQuery
<p>I know it's already discussed here, but there were no solution to get the whole document (including doctype).</p>

<p><code>$(document).html();</code> returns <code>null</code>...</p>
