BBC website now entirely valid XHTML 1.0 Strict

B

Beauregard T. Shagnasty

123Jim said:
I come back from holiday to find that the BBC now validates XHTML 1.0
Strict.
http://www.bbc.co.uk/
http://www.bbc.co.uk/news/
http://www.bbc.co.uk/news/uk-scotland-10739868
Impressive!
Is this the way to go? Not HTML 4.01 strict?

Except that it is still being sent as:
Content-Type: text/html
instead of
Content-Type: application/xhtml+xml
which means certain browsers (whose initials are Internet Explorer) will
interpret it as tag soup. If sent correctly, IE (all versions) will
simply "offer to download the file."

According to:
http://en.wikipedia.org/wiki/XHTML#Adoption
(see paragraph beginning with: "Most web browsers have mature support")
this *might* be cured with the advent of IE9. This browser, however,
won't play on XP, so expect years until it becomes common.
 
1

123Jim

Beauregard T. Shagnasty said:
Except that it is still being sent as:
Content-Type: text/html
instead of
Content-Type: application/xhtml+xml
which means certain browsers (whose initials are Internet Explorer) will
interpret it as tag soup. If sent correctly, IE (all versions) will
simply "offer to download the file."

According to:
http://en.wikipedia.org/wiki/XHTML#Adoption
(see paragraph beginning with: "Most web browsers have mature support")
this *might* be cured with the advent of IE9. This browser, however,
won't play on XP, so expect years until it becomes common.

Maybe being sent as the former rather than the latter is the little hack to
allow access by lesser browsers .. although when I changed the Content-Type
to application/xhtml+xml it rendered fine in IE8. .. and a pox on those
people using old browsers :))
 
J

Jeremy J Starcher

Maybe being sent as the former rather than the latter is the little hack
to allow access by lesser browsers .. although when I changed the
Content-Type to application/xhtml+xml it rendered fine in IE8. .. and a
pox on those people using old browsers :))


Content-Type in the HTML != Content-Type of the HTTP header.
 
1

123Jim

Jeremy J Starcher said:
Content-Type in the HTML != Content-Type of the HTTP header.

Yes .. I understand it's the web server's business to send the HTTP header
... but I'm not sure how that exactly works at the browser end .. why does it
even need that since all the info should be contained in the web-page?

The dark recesses of my brain is reminding me that someone said we should
stick with HTML 4.01 strict unless we have control of the web server to
insist it sends the appropriate header for XHTML. .. also xhtml may never
make it as the standard as HTML5 is on the way.
 
B

Beauregard T. Shagnasty

123Jim said:
Yes .. I understand it's the web server's business to send the HTTP
header .. but I'm not sure how that exactly works at the browser end
.. why does it even need that since all the info should be contained
in the web-page?

There are zillions of web pages that do not contain a Content-Type,
because the author is not aware of it (and other items).

Do you have Firefox's Developer Toolbar installed? Visit the main BBC
page and look at: Information > View Response Headers


Date: Sat, 24 Jul 2010 20:42:48 GMT
Server: Apache
Etag: "1280004140"
Cache-Control: max-age=60, private
Vary: Accept-Encoding
Content-Encoding: gzip
Age: 27
Content-Length: 16837
Content-Type: text/html <--- the HTTP header, not the HTML

200 OK

ISTR that even if the meta element says text/html but the HTTP header
says application/xhtml+xml - the HTTP header will win out.
The dark recesses of my brain is reminding me that someone said we
should stick with HTML 4.01 strict unless we have control of the web
server to insist it sends the appropriate header for XHTML. .. also
xhtml may never make it as the standard as HTML5 is on the way.

Most regulars 'round here would recommend HTML 4.01 Strict.
 
1

123Jim

Beauregard T. Shagnasty said:
There are zillions of web pages that do not contain a Content-Type,
because the author is not aware of it (and other items).

Do you have Firefox's Developer Toolbar installed? Visit the main BBC
page and look at: Information > View Response Headers

............................................>

thanks .. I did not realise Developer toolbar had this!

Most regulars 'round here would recommend HTML 4.01 Strict.

I have heard that a few times here and there .. good to know I'm still in
the loop :)
 
C

cwdjrxyz

I come back from holiday to find that the BBC now validates XHTML 1.0
Strict.http://www.bbc.co.uk/http://www.bbc.co.uk/news/http://www.bbc.co.uk/news/uk-scotland-10739868
Impressive!
Is this the way to go? Not HTML 4.01 strict?

No, this is not the right way to go, because it is not served
properly. If you validate at W3C and select "show source" and "verbose
output" under "more options" you find content type is "text/html".
Thus the page is being parsed as just html, not xhtml, and you would
better use html 4.01 strict in the first place. To serve the page
properly as xhtml, you must associate some extension such as .xhtml
with a xhtml mime type since .html is used by most servers for
ordinary html pages. If you do this, the page is parsed as xml, which
is extremely strict. A tiny error such as not closing a tag can give
you an error report from the parser rather than a view of the page.
This is because an xhtml page must be capable of handling xml
properly. A valid xhtml page served properly will be displayed
properly by most modern browsers. The glaring exception is that no IE
browser including IE8 can display an xhtml page served properly, but
there have been rumors that IE9 may finally display a properly served
xhtml page. Thus you must provide a html page for IE. One way to do
this is to use a php include at the very top of the page. Using header
exchange, the computer asks the server if it will accept xhtml. If so,
the xhtml page is used. If not, the xhtml page is re-written using
regular expressions, etc. to make it valid html 4.01 strict, for
example.

Furthermore xhtml 1.0 (3 versions) is now quite old, and xhtml 1.1 has
been around quite a while. Since xhtml 1.1 is not much more difficult
than html 1.0, I can not see the point in using xhtml 1.0 at this late
date. In fact a higher version of xhtml has had some work done on it.

I did validate http://www.bbc.co.uk/ at the W3C css validator. This
gives 18 css errors and 2700 warnings for the page.

I would guess that about 99% of pages that claim to be xhtml are
nothing of the sort. The w3c validator only checks to see if the code
validates as xhtml. It only will tell you if it is served properly as
xhtml if you find the proper mime type for it is used by the server
under "content type" at the W3C validator. Apparently many are not
aware of this.
 
D

dorayme

"123Jim said:
I come back from holiday to find that the BBC now validates XHTML 1.0
Strict.
http://www.bbc.co.uk/
http://www.bbc.co.uk/news/
http://www.bbc.co.uk/news/uk-scotland-10739868


Impressive!

I suppose so, it is an improvement from just two days back, but
two out of the three urls still don't quite make the finishing
line. I guess people are working on it all the time and whovere
does is not in touch with whoever it is that checks to see it is
valid before it goes on line or something like that?

Is this the way to go? Not HTML 4.01 strict?

Why would mere syntactical validity make you think this? *This*
is not much to do with the reasons for choosing 4.01 Strict.
 
1

123Jim

dorayme said:
I suppose so, it is an improvement from just two days back, but
two out of the three urls still don't quite make the finishing
line. I guess people are working on it all the time and whovere
does is not in touch with whoever it is that checks to see it is
valid before it goes on line or something like that?



Why would mere syntactical validity make you think this?
......

If a 'big' popular website chooses a standard . it might be an indication
that this is the way the wind is blowing generally .. Standards make it
better for everyone. webdevs, browser devs, etc.. Compare to the other web
portal type sites the BBC at least displays an awareness and willingness to
work to standards .. good for them.
 
1

123Jim

123Jim said:
.....

If a 'big' popular website chooses a standard . it might be an indication
that this is the way the wind is blowing generally .. Standards make it
better for everyone.

.....
Also I have a good website here on how to suck an egg :)))
 
D

dorayme

"123Jim said:
.....

If a 'big' popular website chooses a standard . it might be an indication
that this is the way the wind is blowing generally .. Standards make it
better for everyone. webdevs, browser devs, etc.. Compare to the other web
portal type sites the BBC at least displays an awareness and willingness to
work to standards .. good for them.

There are at least two distinct questions here. One is about
validity and I have made a comment about this.

The other is about which standard to follow. That the BBC and
just about everyone else have gone to other than 4.01 Strict
certainly shows which Mother Goose is thought a thing of the
past. But trendiness and popularity is not an indication of
wholesome goodness.
 
D

dorayme

Ben C said:
They've also done some rather nasty things with negative margins on
floats which I don't really approve of and are causing me to take a long
hard look at the spec.

Right neg margins on right floats produce scrollbars, left neg
margins on left floats can serve to make the left of things
partly or wholly disappear. Some counterintuitive things happen
with floats with neg margins so it is an interesting thing to
look at.

A suspicious motive of the BBC would be as a hack to position
stuff when things are not quite working out in looks the way the
authors wants. I have not looked hard at what they do.

But let us know if you find anything interesting in the specs
about this matter.
 
1

123Jim

dorayme said:

You are not familiar with the phrase: 'Teach your granny to suck eggs'?
On reading my reply to you earlier I found that it could have been construed
as teaching granny to suck eggs as I am sure you are well up on the value of
web standards etc. not that you are someone's granny, and you are not
required to literally know how to suck eggs .. why grannies are up on that I
don't know. :))
 
D

dorayme

"123Jim said:
You are not familiar with the phrase: 'Teach your granny to suck eggs'?
On reading my reply to you earlier I found that it could have been construed
as teaching granny to suck eggs as I am sure you are well up on the value of
web standards etc. not that you are someone's granny, and you are not
required to literally know how to suck eggs .. why grannies are up on that I
don't know. :))

I am very familiar with the expression. You meant it well and I
am sending a team of bearers with gifts to you. There will be 4
sheep, 1 cow, 3 pigs, and a big bag of dried Molokhia (from which
you can make an Egyptian Greens Soup which I am recently having a
go at. My mummy used to make it).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top