Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I dump the entire Web DOM in its current state in Chrome?

I want to dump the current DOM to a file and be able to view it offline. Essentially, I have an outdated version of a page that I would like to keep around for comparison. As soon as I close my browser, I'm going to lose it so I would like to save the DOM exactly as it is.

There is already an answer for doing this in Firefox but how do I do it in Chrome?

like image 258
styfle Avatar asked Aug 27 '12 17:08

styfle


People also ask

How do I copy an entire DOM?

You can easily change the DOM without having to edit the HTML as a big piece of string. Right click on a node and select Copy. You can paste in your code editor, or for prototyping, you can paste the DOM node elsewhere in the DOM tree. The pasted node is inserted as a child of the currently selected node.

How do I save DOM in Chrome?

Using the Web Inspector (F12), go to the Elements tab, right click on the <html> tag in your code and select Copy -> Copy outerHTML . Then paste that into a new file and save.


1 Answers

Using the Web Inspector (F12), go to the Elements tab, right click on the <html> tag in your code and select Copy->Copy outerHTML. Then paste that into a new file and save.

like image 134
Damon Avatar answered Sep 20 '22 22:09

Damon