Page 2 of 2

Re: XHTML 1.1 and Firefox

Posted: Thu Sep 17, 2009 6:14 am
by Eran
Surely that's the point of XHTML
Absolutely not. XHTML is a stricter version of HTML, integrated with some concepts of XML. however it can and should (in my opinion) be served as HTML since XML is much less forgiving. any small syntax error and the page would not be displayed at all, and most HTML entities will not display correctly (as they are not valid XML entities). This is one of the main reasons the syntax was preserved and integrated into HTML 5, but the delivery format (XML) was discarded.

Re: XHTML 1.1 and Firefox

Posted: Thu Sep 17, 2009 6:58 am
by jackpf
But if you're sending it as HTML, then it will be interpreted as HTML...and the syntax is completely incorrect.

I don't think XHTML is any stricter than HTML. It's just that XHTML enforces validity with errors and stuff.

Re: XHTML 1.1 and Firefox

Posted: Thu Sep 17, 2009 7:11 am
by Eran
But if you're sending it as HTML, then it will be interpreted as HTML...and the syntax is completely incorrect.
Wrong, the syntax is interpreted according to the doctype (for markup correctness and validation according to the w3 standards). XHTML is both HTML and XML, and can be served as both.

Re: XHTML 1.1 and Firefox

Posted: Thu Sep 17, 2009 7:12 am
by jackpf
But obviously firefox has to convert it back to HTML to display it...that must have a slight performance hit.

I'm not entirely sure I agree :P

Re: XHTML 1.1 and Firefox

Posted: Thu Sep 17, 2009 7:17 am
by Eran
I didn't really try to understand what the OP is talking about, since I never encountered anything like it. All the sites I develop are XHTML transitional and Firefox shows the markup exactly as I put it if you check the source. There is no conversion of any kind going on. XHTML is HTML, there is no performance hit or conversion necessary for browsers to display it.
When you 'view source' it shows alright but if you 'view selection source' it seems it converts it to plain html because Firefox can't find the doctype.
The OP has noted that with the doctype is renders correctly.

Re: XHTML 1.1 and Firefox

Posted: Thu Sep 17, 2009 7:22 am
by jackpf
http://xhtml.com/en/xhtml/serving-xhtml-as-html/ wrote:If a the media type for an XHTML Web page is given as text/html, the Web browser will parse the Web page as though it were HTML. If the media type is given as application/xhtml+xml, the browser will parse the page as XML.
...so surely the browser has to convert it to html in order to parse it as html?

Re: XHTML 1.1 and Firefox

Posted: Thu Sep 17, 2009 7:26 am
by Eran
Again, XHTML is HTML.. with slightly more elaborate and stricter syntax. If the page is served as content type text/html the browser will parse it as HTML, meaning - it will show HTML entities, it won't break on syntax errors, etc, etc.. with xhtml/xml it will apply XML strictness to the parsing process. You can say the opposite - that with xhtml/xml it converts the document to XML, but that again would not be true. XHTML is both HTML and XML. The question is which set of directives to apply on it (according to the headers)

Re: XHTML 1.1 and Firefox

Posted: Thu Sep 17, 2009 9:58 am
by jackpf

Re: XHTML 1.1 and Firefox

Posted: Thu Sep 17, 2009 11:32 am
by Eran
What? you are going to take the opinion of some guy named autistic cuckoo over mine? ;)
Seriously though, this is just this guys opinion. You can find dozens of articles warning that trying to serve XHTML as xml/xhtml is not for the faint of heart and probably not something you want to do on a production site. You can also find some in the comments.

Re: XHTML 1.1 and Firefox

Posted: Thu Sep 17, 2009 1:48 pm
by jackpf
Yeah...I do agree with you. My site is XHTML served as HTML...so I can't really say "don't do it" :P

I do, however, believe that in order to benefit from XHTML you should serve it as such...otherwise, what's the point?

Re: XHTML 1.1 and Firefox

Posted: Thu Sep 17, 2009 2:17 pm
by Eran
The point is to have stricter and cleaner syntax. That's more a personal preference, but I prefer XHTML syntax to HTML syntax

Re: XHTML 1.1 and Firefox

Posted: Sat Sep 19, 2009 12:05 am
by mahalakshmi
hi good posting :cry: :cry:

Re: XHTML 1.1 and Firefox

Posted: Sat Sep 19, 2009 8:01 am
by jackpf
pytrin wrote:The point is to have stricter and cleaner syntax. That's more a personal preference, but I prefer XHTML syntax to HTML syntax
Yeah, I prefer it too. That's why I use it :D Self closing elements makes more sense than just...not closing them imo.
mahalakshmi wrote:hi good posting :cry: :cry:
umm..what?