Forum Moderators: open
One interesting thing I've found in the code though is meta tags. They occur when I save the page in MSIE (and maybe Netscape too, I haven't tried it) I create the page using notepad, then open the page file (home_page.htm) in MSIE. Then I go to the top of the browser, click on "File", and then "Save as", and save the file. Then when I view the source code again, amoung other things, meta tags have been automatically added. Examples are below.
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
The page seems to work just as well with or without them and my question is, what do they mean?
Also several other things happen too like the doctype is automatically inserted, some code is indented for example tables (the <td> tag is indented maybe two inches over), the order of the attributes inside the tags are rearranged, and some tags are all put on the same line. I'm sure there's some method to all of this.
It all happens when I save the page through the browser. Does anyone know what's going on?
Thanks again to everyone. You're a great group.
[edited by: encyclo at 5:06 pm (utc) on Nov. 6, 2006]
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
indicates that the content of the page as saved as HTML text in the Windows-1252 character set. The character set is the map by which the numeric codes for each character in the document are translated into the shapes you see on screen. Windows-1252 is a set of characters used for Western European languages in Microsoft Windows; you may have also heard of iso-8859-1 (or Latin-1), a standard Western European character set, or utf-8, a universal character set.
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
indicates that the page was created by "MSHTML 6," that is, Internet Explorer 6. This tag is entirely optional and unused by the browser; it simply stamps the page as being the output of a particular piece of software.
It's important to understand that using IE or Firefox's "Save Page" or "Save Page As" option will produce code that is different, perhaps radically different, from the actual original version on the server. When you save a page, the browser assumes you intend to browse it locally, so it modifies the paths of associated files and inserts markup which may help it interpret the page. "View Source" is a more reliable way of seeing the true code.