Hacker News new | past | comments | ask | show | jobs | submit login

> Do MIME types in HTTP headers affect how browsers render content?

You can test it with the following snippet:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head><title>test</title></head>
    <body>
    <h1 style="color:green"><span style="color:red" />If this text is green, this file was parsed as XHTML</h1>
    </body>
    </html>
With Content-Type set to "text/html" the text will be red, with "application/xhtml+xml" it will be green.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: