Jeff Key

It works on my machine

Sponsors

My Job

My stuff

Old stuff

Useful Stuff

Error messages that tell you what's wrong, but not what's right

So I'm trying to do the right thing and validate a web page to ensure it's XHTML compliant.  Here's the result:

Sorry, I am unable to validate this document because its content type is text/plain, which is not currently supported by this service.

OK, great.  You can't handle text/plain.  I'm sorry.  So what do you handle?  What do I need to do to resolve this?

Unfortunately, this type of error message is quite common.  If you can give an error description this specific, it's also possible to give the user instructions on how to avoid the error.  The users are your friends -- help them out.

Comments

dru said:

Try placing this in the <HEAD>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
(Assumes UTF-8)

And this at the top:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
(Assumes XHTML 1.0 Strict)
# April 26, 2004 10:16 PM

Jeff Key said:

Thanks, Dru!
# April 26, 2004 10:37 PM

clarson said:

Not only this, error messages should hava a link to a website that could have much more detail about the problem and solution than the typical terse message. For example, Microsoft could put a link in all their error mesages that pointed to a support article or list of articles. Also, add some detail about the error link in a querystring to further fine tune the solution provided. They could log all the hits they get from these error message links and build up a database of error inquiries to highlight where they need to make improvements.
# April 26, 2004 10:42 PM

Jerry Pisk said:

Jeff, even when you add those tags you still need to setup your web server so it serves HTML as HTML, not as plain text. You complaining about that is like me having an executable named program.txt and complaining that Windows won't execute it (it actually will but not from the shell).

As for what the W3C's HTML/XHTML validator handles - HTML (text/html) and XHTML (application/xhtml+xml). They don't try to validate plain text (there are no rules as to how should a plain text document be structured). Unfortunatelly the best browser on the Earth does not handle XHTML very well...
# April 26, 2004 11:37 PM

secretGeek said:

i was just bloggin 'bout this last week -- as clarson says, links to relevant articles would be excellent.

if big software companies did this, it would also lift a few technical writers out of the ranks of the unemployed :+)

cheers
lb
# April 26, 2004 11:37 PM

Jeff Key said:

Jerry: The site has an textbox to upload a web page. I save the HTML from a page and uploaded it. What did I do wrong?

clarson: Definitely agree. Nice to see that MSFT is starting to do this in some areas. I hope the trend continues.
# April 26, 2004 11:42 PM

Jerry Pisk said:

Jeff - if you use the file upload then you did nothing wrong, but since you're not uploading the response headers (because you simple can't, no fault at anyone's end) you need to explicitly set your content type and encoding. The validator is really built to validate live pages by pulling them off of the web server, since HTTP pushes a lot of metadata with each response that is not preserved when you save the HTML content to a text file.

Or you may just need to save the file as .html, not .txt (since your browser will set the content-type on the file you upload, text/plain in case of .txt files).
# April 27, 2004 4:15 AM

dru said:

If you are using the w3c validator they should have a suggestion box. Ahh, but they don't how very bad of them. I have written an email to the w3 validator team asking for a suggestion box and that they rework that error message. We will see what happens.
# April 27, 2004 8:41 AM

dvd decrypter copy said:

As reported before, iTunes has a problem with Vista. The new iTunes version 7. 1. 1., released last week, which packs a lot of new features, fixes some of these problems, but not all. As I report in my other blog (iTimes), iTunes has been updated to accommodate

# April 21, 2008 1:14 AM

shrink dvd said:

In my post Controlling computers, I wrote about Jeff Han, whose team has created a mindboggling new prototype for a computer interface. Now, at TED, you can see Jeff show the interface and explain a bit how it works. This is what our kids will be usin

# April 28, 2008 3:36 PM

dvd burning software said:

D- dimer blood test. Having high levels of the clot- dissolving substance D dimer in your blood may suggest an increased likelihood of blood clots, although D- dimer levels may be elevated by other factors, including recent surgery. Drawing the blood

# April 28, 2008 6:09 PM

dvd decrypt software said:

Now, what you do NOT want to do is to then double- click the newly- created. reg file to import the contents to your registry- at least not yet. Open Outlook Express on the‘ new computer’ and set up the mail account. Now, go to the same registry location

# April 28, 2008 8:56 PM

dvd x copy said:

My husband’ s computer wouldn’ t boot: Blue Screen of Death. The error was in a file SR. SYS but I couldn’ t boot to get to it to copy a good one over the bad one. Enter Bart’ s Preinstalled Environment Bootable Windows CD/ DVD. I didn’ t have a bootable

# April 29, 2008 1:20 AM

dvd decoders for windows said:

1. Make sure your PC is compatible with the hardware you’ re considering. This is perhaps the most critical part of buying new hardware. If you’ re in the market for a new video card, know if your computer has AGP or PCI- Express when you shop for your

# April 29, 2008 6:05 AM

how record dvd said:

Neuerscheinung PC Tools Spyware Doctor auf der CeBITVirenschutz. info- vor 44 Minuten gefundenPC Tools will die CeBIT auch als Forum nutzen, um mögliche Partner im Reseller-, Retail- und OEM- Bereich über das Unternehmen, seine Lösungen und Partnerprogramme

# April 30, 2008 3:10 AM

vhs ripper said:

Visually see disk space usage in Windows Explorer Lijit Search Recent Comments David Mendonca on Nokia\'s \"Care\" Centres PBX Phone Systems on A Directory Of Programs Designed For USB Drives go on A Directory Of Programs Designed For USB Drives Jeremy

# June 17, 2008 12:22 PM

downloading dvd to computer said:

System checkpoints. System Restore creates restore points on a regular basis even if you have not made any changes to the system. System Restore automatically creates these restore points every 24 hours of calendar time, or every 24 hours your computer

# June 19, 2008 11:03 AM