473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DOCTYPE and validation

I was reading the New York Times
http://www.nytimes.com

and I took a peek at the code. It's got a DOCTYPE, rather to my
surprise,
but my gut reaction to the scanning the code is, "I pity whoever
maintains this puppy." So for giggles I asked

http://validator.w3.org

what it thought of the NYT, and it said, "I can't find the encoding! I
looked
everywhere!"

But looking at the code I see:

<meta http-equiv="Content-Type" content="text/html">
<meta http-equiv="charset" content="iso-8859-1">

-- so why didn't the Validator spot it?

Not surprisingly, the page doesn't validate.

Another question: Why bother setting a DOCTYPE if your page won't
validate? Why set a DOCTYPE if you're not (as far as I can tell in the
morass of JavaScript and table-formatting) going to use CSS?

Mary Ellen
Doctor Science, MA
Jul 20 '05 #1
2 1962
On Sat, Jul 26, Mary Ellen Curtin inscribed on the eternal scroll:
I was reading the New York Times
http://www.nytimes.com
[INLINE]
[INLINE] [LINK] [INLINE] [INLINE] The New York Times On The Web
[INLINE] [LINK] [INLINE]
[INLINE] [INLINE] [INLINE]
[INLINE] UPDATED SATURDAY, JULY 26, 2003 3:12 PM ET [INLINE] |
[INLINE] Personalize Your Weather [INLINE]
[INLINE]
[INLINE]

Par for the course, it seems...
what it thought of the NYT, and it said, "I can't find the encoding!
I looked everywhere!"
Oh, it looked everywhere that the specifications said it should look!
But looking at the code I see:

<meta http-equiv="Content-Type" content="text/html">
<meta http-equiv="charset" content="iso-8859-1">

-- so why didn't the Validator spot it?
Do you have a published interworking specification that codifies such
behaviour? I don't know of one. The key applicable specification
would have to be RFC2616 - look at the header field definitions in
section 14. Do you see a "Charset" header there? I don't. So - that
META is claiming to be equivalent to an HTTP header that doesn't
exist.

Netscape did manage to wangle that once, with their "Refresh"
pseudo-header, but as a general principle it's not on.
Another question: Why bother setting a DOCTYPE if your page won't
validate?
Superstition? You've already guessed that it might also be done to
fool a browser into interpreting CSS in standards-mode...
Why set a DOCTYPE if you're not (as far as I can tell in the
morass of JavaScript and table-formatting) going to use CSS?


Some kind of magic chicken waving ceremony, perhaps. Who knows
what motivates such folks, and where they get their documentation
from?
Jul 20 '05 #2
Alan Flavell wrote:
Why set a DOCTYPE if you're not (as far as I can tell in the
morass of JavaScript and table-formatting) going to use CSS?


Some kind of magic chicken waving ceremony, perhaps. Who knows
what motivates such folks, and where they get their documentation
from?


Thinking it over, I believe it probably represents one geological
stratum among many in the code for the NYT site. I imagine that
"what motivates such folks" is that they can't afford to redo the whole
enormous site from scratch, so they're just sticking patches on top
of rebuilds on top of patches. Pray it never happens to you.

Mary Ellen
Doctor Science, MA
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: BODIN | last post by:
I have an XML document, which is actually physically stored in 2 separated files. doc1.xml and doc2.xml I NEED a WAY FOR THIS SIMPLE NEED : XML file splitted into two physical files, and use...
7
by: David Ross | last post by:
I manually code my HTML without using any page generating software. I need to know how to specify the DOCTYPE at the beginning of my HTML files. No, I don't want a "canned" DOCTYPE statement. ...
39
by: Holly | last post by:
I'm trying to validate my code and I can't figure out what kind of doctype I have. The validator can't tell me anything because it can't move beyond the doctype declaration. ...
14
by: Mary Ellen Curtin | last post by:
(bad developer! no biscuit!) Hello gang, I'm a newbie here and to CSS, though I've been hacking around in HTML for a bit. One of the ways I've been learning CSS is by wending through AListApart....
1
by: Chris Fink | last post by:
I am receiving xml documents from a customer without a reference to a doctype. I know what the Doctype DTD should be need to insert the declaration as follows <?xml version="1.0"...
3
by: YewMing | last post by:
Hi, I have some XML files that needs to be validated with a DTD but the xml files does not have the DOCTYPE tag that reference to the dtd file. Is there any way to tell XmlValidatingReader to...
29
by: AndyZa | last post by:
According to the w3c specs a web page is not valid if the DOCTYPE declaration is missing. So, if I add the following doctype to my pages they will be "compliant": <!DOCTYPE HTML PUBLIC...
2
by: PapaRandy | last post by:
Hello, I am trying to validate the following .py webpage as HTML (through W3C). I put: ----------------------------------------------------------------------------- print "Content-type:...
6
by: Rolf Welskes | last post by:
Hello, if I have for example: <table style="width: 100%; height: 100%;" border="1"> <tr> <td style="width: 100px">k </td> <td style="width: 100px">k </td> </tr>
20
by: Deborah | last post by:
I'm trying to clean up my website, and it's in pretty good shape now, but I've gotten confused reading about Doctypes. My site is http://www.simi-therapy.com and my CSS is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.