I have noticed that Internet Explorer, which is used by the Web Browser component, modifies the original sourcecode. I undestand that some of the code must change due ajax requests and everything. When I stated that the html is modified, I refer to those tags that are inserted even when they are not in the actual sourcecode. For example, IE completes the “body” tag when is not present, also the “tbody” tag when a table does not have it. Is there a way to keep the original structure of the document?
If you dont understand the question let me know, thanks.
I had to make some assumptions but here is my theory:
What you are seeing is not IE altering the HTML. I don’t know how you saw this but this is IE serializing its DOM tree. Of course IE must close the body tag (or create the body DOM element if we have to be exact) in order to render something. The serialized DOM is not what the original HTML was and if you want to extract the original HTML you are probably not using the right tool. This behaviour sometimes surfaces in WSIYWYG editors and when using save page in IE. It just dumps its internal DOM tree back into a string and in a DOM tree there are no incomplete elements because they are tree nodes not tags.