Get real page source

Nowadays with all these javascript frameworks if you just do a view page source, you will only get the skeleton app div with a bunch of script tags. To see the expanded real page source, type in the following in the web console.

copy(document.querySelector('html').outerHTML)

That will copy the computed dom to your clipboard, then you just need to paste it to your text editor. You will see all the other dom nodes which the js files added to the app div.

Ref: https://stackoverflow.com/questions/6364138/how-to-get-fully-computed-html-instead-of-source-html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s