If I code a simple HTML DIV like this:
it works fine. No problem. And if in IE I 'view source', the above is what it shows me.
However, if in JavaScript I display the outerHTML of the DIV, it shows me this:
Note that:
1. Some case has been changed from lower to upper, e.g. div becomes DIV.
2. Some case has been changed from upper to lower, e.g. CLASS becomes class.
3. Some elements have been moved, e.g. align=left is now last.
4. Some double quotes have been removed, e.g. align="left" becomes align=left.
5. Spaces have been inserted into the "style".
My conclusion is that either IE or JavaScript is converting my source code into a standard format. Again, I have no problem with that but my two questions are:
a) If I write my source code TO START OFF WITH in the "standard" format it seems to end up as, will this help IE/JavaScript to run more efficiently?
b) How can I compare the performance of "standard" and "non-standard" format?
Code:
<div id=DivC align="left" CLASS="DivClass" style=HEIGHT:20PX;width:100%>C</div>
it works fine. No problem. And if in IE I 'view source', the above is what it shows me.
However, if in JavaScript I display the outerHTML of the DIV, it shows me this:
Code:
<DIV class=DivClass id=DivC style="WIDTH: 100%; HEIGHT: 20px" align=left>C</DIV>
Note that:
1. Some case has been changed from lower to upper, e.g. div becomes DIV.
2. Some case has been changed from upper to lower, e.g. CLASS becomes class.
3. Some elements have been moved, e.g. align=left is now last.
4. Some double quotes have been removed, e.g. align="left" becomes align=left.
5. Spaces have been inserted into the "style".
My conclusion is that either IE or JavaScript is converting my source code into a standard format. Again, I have no problem with that but my two questions are:
a) If I write my source code TO START OFF WITH in the "standard" format it seems to end up as, will this help IE/JavaScript to run more efficiently?
b) How can I compare the performance of "standard" and "non-standard" format?