The source code is what the server sent to the browser, it can't reflect the live changes. Firebug helps you to inspect live DOM. By using jQuery you can get the HTML of any element in your page including the whole page $("html").html(). Modern browsers support saving files by using HTML5 W3C saveAs() function and the FileSaver.js as polyfill: