I’m not sure whether to put this down to an issue with my (mobile) ISP, or whether it should count against using XHTML sent as
application/xhtml+xml? I’ve recently found that even a well authored site using valid XHTML can display as an XML error in browsers that support XML mime types.
The site was using Internet Explorer’s conditional comments to overcome some limitations in IE, and a reverse conditional comment for non IE browsers:
Unfortunately, when sent over my mobile connection (Orange) the page is reformatted, even though I’m only using it as a modem. The file is stripped of line breaks, and that comment comes out as:
Missing the close of the comment, the strict display mode triggered by the mime type means that only an XML style error message is displayed.
I guess this has to be added to the list of issues (such as user-added content) that makes an XML mime type difficult to manage?
14 contributions to “XHTML disrupted by Mobile access”
Actually, it looks more like a bug in the networks parser to me. Maybe it thinks the first
<!--immediately closes the comment and
<-->is a tag whose name is “–” thinks. Or something.
It would take a more expert eye than mine to guess what’s happened. Do they have a bug reporting address? They’ll know for sure what went wrong, since it’s their own system.
*a tag whose name is “
I think the punctuation plugin for your blog needs some bug fixes! 😛
I’m not going to mess with WordPress’ comment system!
I’ve emailed what I think is the appropriate address, I’ll add a comment if I get a reply back.
Btw, just noticed your scrollable code boxes don’t work quite right in IE6. The third line is obscured by the horizontal scrollbar.
Only way I’ve managed to make them work at all cross-browser is using
overflow: scroll;with lots of
padding. Even this has problems, like visible scrollbars when you don’t need them and Firefox doesn’t them disable correctly in single-line samples.
overflow: auto;would be much more elegant..if only it was supported.
Can’t wait ’till we can drop support for IE6!
I might be able to use an IE only overflow-x or y rule to get over it, I’m using a conditional comments style sheet.
Slight worse, I’ve just noticed a bug in IE7 (possibly 6) where the first paragraph extends under the navigation bar at certain screen widths. Something to do with the fixed width code item and floated image?
Well, it’s only a blog. Don’t lose sleep over it. 🙂
Any response from Orange?
I’d still like to understand the problem.
Anyway, I got this from Orange:
I’ll give them a ring later.
Did they answer?
You might find
overflow-x: scroll;does what you are looking for.
overflow-y: scroll;in Firefox’s
userContent.cssfile so I always have a vertical scrollbar which disables correctly when there’s nowhere to scroll.
IE seemed to respond to the
scrollvalue better than the
autovalue when I was doing Project Cerbera’s boxes. I might play with this today because, much like yourself, I like to understand problems too. Even if I can’t find a solution. 🙂
Project Cerbera now uses
overflow-x: scroll;because it works the same in IE6 and Fx2. O9 doesn’t apply it.
overflow-y: visible;below it might work better.
I’m not losing sleep over it, though.
[if !IE] blocks are NOT valid XML and thus are similarly invalid XHTML as the string ‘–‘ is not allowed in XML comments as described in the specification:
Your comments thing eats double dashes.
Sorry about that, not sure how to adjust that in WordPress.
Regarding the validity, I don’t beleive that it uses double dashes except as comment open/closes, so I don’t think it’s invalid (although thanks for the link).
Unless it’s invalid to have the greater/less than signs next to the double dash? I cut and paste that code into the validator and it didn’t complain, so unless there’s a bug in that, it seems valid (except for the one mangled by the network, obviously).
Sorry, I read the example wrong. You could try putting arbitrary text at the end, like
<!—[if !IE]> —>
Wow, I have never considered the effects that sort of compression for mobile devices would have on pages…
Comments are closed.