The HTTP response header information causes the browser to interpret the information as XML:
HTTP/1.1 200 OK Date: Sun, 21 Feb 2010 02:32:02 GMT Server: Apache/2.2.14 (Debian) Vary: Accept-Encoding Transfer-Encoding: chunked Content-Type: text/xml; charset=UTF-8
You see, the server that served the page was smart enough to detect that it was an XML document, and told the browser. When you download a file from disk, your browser may not be smart enough to do this, and usually relies on a file extension to provide this information.
You can try pasting the following into the <head> element:
<meta http-equiv="Content-Type" content="text/xml; charset=UTF-8" />
Do you see what I did there? This is just a mirror of the HTTP response header, which would indicate the document type and encoding.
The purpose of this tag is to make browsers think, βHey, the server tells me that this document is HTML, but the document tells me XML. The document probably knows better than the server, so I will trust it ... :: interprets how XML :: "
amphetamachine
source share