Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why View source of the page is different than Inspecting the element of the page [closed]

Tags:

html

dom

Okay I'm using Producteev.com frequently on my projects, the other day I noticed that on my workspace page, that the source of the page (Ctrl+U) is quite short and most of the page's items are not in the view source code.

but of course if you inspect the elements of the page you see the actual codes.

I'm not sure if this is the right place to ask such question but I'd like to know why is this happening and using what technology maybe? and also why they do use such techniques?

like image 605
Gus Avatar asked Sep 04 '25 16:09

Gus


2 Answers

Viewing the source shows the source code.

Inspecting the DOM shows you a serialisation of the current state of the DOM after the HTML has been parsed, error corrected, normalised and (possibly) manipulated with JavaScript.

like image 70
Quentin Avatar answered Sep 07 '25 17:09

Quentin


DOM elements that have been added dynamically after the page is generated will not be included in the page source.

like image 20
David Lounsbrough Avatar answered Sep 07 '25 18:09

David Lounsbrough