Sign in to follow this  

[web] Help with validating my site.. XHTML 1.1

This topic is 4536 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, i made a new site layout for my site and validated it from file on my pc (XHTML 1.1) and validated the CSS from file. yet when i checked i again my i belive my web host added in extract scripts etc at server side so it's not validate (although they do not apear in the file). anyone know what i should do or should i just ignore it? http://www.womangeeks.com/alts/index.html

Share this post


Link to post
Share on other sites
Get a decent webhost that will not append scripts to your website. Other then that I don't think there is too much you can do since it probably isn't added until the page is called. You might be able to remove is using some JS hack though. Otherwise maybe contact your host and see if they will remove it (doubtful).

Share this post


Link to post
Share on other sites
XHTML 1.1 recommends (requires?) that pages be sent as application/xhtml+xml. You can fix this by changing the file extension to .xhtml if your host is properly set up.

It's generally not a good idea to serve XHTML 1.1 to clients. Last time I checked, it was not supported by Internet Explorer, and also scripts that depend on the HTML DOM will break.

Share this post


Link to post
Share on other sites
Quote:
Original post by igni ferroque
It's generally not a good idea to serve XHTML 1.1 to clients. Last time I checked, it was not supported by Internet Explorer


It works fine for me...but admittedly, I haven't pushed the boundaries of CSS very far. Basic XHTML 1.1 is fine in IE6 though.

[Edited by - Promit on July 8, 2005 3:00:30 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Quote:
Original post by igni ferroque
It's generally not a good idea to serve XHTML 1.1 to clients. Last time I checked, it was not supported by Internet Explorer


It works fine for me...but admittedly, I haven't pushed the boundaries of CSS very far. Basic XHTML 1.1 is fine in IE6 though.

I think he's refering specifically to using the application/xhtml+xml content type. IE does not support it. This can be worked around using something like PHP and sending the application/xhtml+xml type only to user agents that specify it in their HTTP_ACCEPT header.

Share this post


Link to post
Share on other sites
When browsers are sent a page as text/html they tend to not know what to expect. It could be valid markup or it could be 1997-style tag soup. XML parsers will choke on tag soup and generally give their users an unhappy experience viewing the web so browsers do not use them for pages sent using text/html. When you send a page using application/xhtml+xml you are telling the browser that the document is well formed XML and so the browser is able to use its XML parser. I assume the MIME is application/xhtml+xml because, since the document is XML, it is possible to also include other XML applications into the XHTML document such as MathML or SVG perhaps.

Share this post


Link to post
Share on other sites
Quote:
It works fine for me

By serving XHTML 1.1 as HTML you are limiting yourself to the subset of HTML-compatible language elements. For example, shorthand anchor, textarea, and script tags will be treated as unclosed tags by most parsers. Since IE does not support XHTML, and since browsers parse XHTML that was sent as 'text/html' as malformed HTML, the usefulness of sending XHTML to the client is limited.

In my experience, the biggest motivation for using XHTML is to be able to use XSLT for templating; either rendering the site before uploading it, or performing server-side processing. Either method allows the result to be converted to valid HTML 4.01 for serving to the client.

Share this post


Link to post
Share on other sites

This topic is 4536 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this