Opened 17 years ago
Last modified 9 years ago
#6411 new enhancement
Use mime type switching
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | unscheduled |
Component: | rendering | Version: | 0.10.4 |
Severity: | normal | Keywords: | xhtml mime html text/html application/xml+xhtml consider |
Cc: | Thijs Triemstra | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The Doctype in your code identifies the document as XHTML 1.1 while the mime type is text/html. It is "STRONGLY RECOMMENDED" by the W3C that XHTML document are served with the application/xhtml+xml mime type. I realize that doing this would break compliance with Internet Explorer, but this can be solved with mime type switching (php example not by me). Also if the code is not compliant it will not show on XHTML compliant browsers. If the code is not valid, then you should not use the XHTML doctype anyway. This means that everything that is user input must be checked for valid code. Thanks for your time.
Attachments (0)
Change History (7)
comment:1 by , 17 years ago
Keywords: | consider added |
---|---|
Milestone: | → 1.0 |
comment:2 by , 17 years ago
Mime type switching must be done if the website is to interpreted as XHTML. If the mime type is text/html that overrides anything in the document because the higher level mime takes precedence over (X)HTML. If mime switching is not implemented then the XHTML is interpreted as HTML and parsed as tag soup because f the mime text/html. The mime type can't be static because IE would then try to download the file but if you have a diffrent solution I would like to hear it. Also I realize that rewriting code so that it is valid takes a long time so I understand that this will take time.
comment:3 by , 17 years ago
This may be helpful in understanding the problem (it was news to me until today, too) and how to fix it: http://www.ibm.com/developerworks/xml/library/x-tipapachexhtml/index.html (how to deal with browsers incompatibilities; also see the Resources section for useful links)
comment:6 by , 14 years ago
Cc: | added |
---|---|
Summary: | Incorrect mime type → Use mime type switching |
Type: | defect → enhancement |
comment:7 by , 9 years ago
Owner: | removed |
---|
We're aiming at producing valid XHTML, yes, though we're not completely there yet. Even once we are, we will still want to maintain compatibility with IExplorer, and I'm not sure that the mime type switching hack is worth the effort.