473,624 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

W3C HTML Validator Error - Invalid content-type

Hello, I'm having a slight problem using the W3C html validator and I've
reviewed the FAQ's with no luck so hopefully someone here would be kind
enough to point me in the right direction.

I recently validated my site's css and the bulk of the html pages via the
W3C validator but was forced to use the file upload option because the
'Validate by URL' option returns the following error:
Sorry, I am unable to validate this document because its content type is

http://www.ortonage.com, which is not currently supported by this service.
The Content-Type field is sent by your web server (or web browser if you use
the file upload interface) and depends on its configuration. Commonly, web
servers will have a mapping of filename extensions (such as ".html") to MIME
Content-Type values (such as text/html).

I'd now like to determine why I'm receiving the error. The web site is
http://www.ortonage.com. So far, I've verified that the server mime types
are configured correctly on the web server (MS IIS). I know I'm probably
going to get beat up because I'm using MS IIS but it has met my needs so
far. :) I've also verified the doctype is correct <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> and that the meta tag <META
HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> is
correct. I'm now at a loss on where to look next.

The site uses a URL rewriter so even though the URL appears as static to the
client it gets modified by the server to a dynamic URL before processing and
responding to the client. I'm wondering if the server is not including the
correct content-type in the header information because the ".htm" is
stripped from the URL during processing and before the response is actually
returned to the client side. If that is the case, any ideas on how to
rectify the problem? I also have the meta tag equivalent in each web page
so I thought that it might guarantee the content-type is set correctly.
Works fine for Netscape and IE browsers. I've only seen this problem on W3C
so far.

Any suggestions would be very much appreciated.

Thanks.

Trevor Orton (www.ortonage.com)
Jul 23 '05 #1
22 5691
On Sat, 13 Nov 2004 00:48:06 -0500, "Trevor Orton"
<or******@yahoo .com> wrote:
I recently validated my site's css and the bulk of the html pages via the
W3C validator but was forced to use the file upload option because the
'Validate by URL' option returns the following error:
Sorry, I am unable to validate this document because its content type is

http://www.ortonage.com, which is not currently supported by this service.
The Content-Type field is sent by your web server (or web browser if you use
the file upload interface) and depends on its configuration. Commonly, web
servers will have a mapping of filename extensions (such as ".html") to MIME
Content-Type values (such as text/html).

I'd now like to determine why I'm receiving the error. The web site is
http://www.ortonage.com. So far, I've verified that the server mime types
are configured correctly on the web server (MS IIS).


No they're not.

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Sat, 13 Nov 2004 06:32:48 GMT
Set-Cookie: u=1704538305; expires=Tuesday , 11-Nov-14 06-32-48 GMT;
path=/;
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Sat, 13 Nov 2004 06:32:48 GMT

See? No Content-Type header at all.

Steve

Jul 23 '05 #2
In article <z4************ ********@rogers .com>, "Trevor Orton"
<or******@yahoo .com> wrote:
Any suggestions would be very much appreciated.


<http://www.htmlhelp.co m/tools/validator/> says everything is OK. The W3C
validator can't parse it. I'll leave it to others to tell you why.
You asked only for a solution to one problem. I have to tell you that from
a design point of view, you have two.

leo

--
<http://web0.greatbasin .net/~leo/>
Jul 23 '05 #3
First of all, the validator is saying there is something wrong with
your server, not with your page. It never even tried to validate
your page.

You need to have your Web host correct the server's .htaccess file
to define a MIME type for HTML files. It's not unusual for an
individual Web site to also have its own .htaccess file for
esoteric MIME types; I have one. However, your Web server should
already have HTML defined in its master .htaccess.

However, I can tell you that you definitely have a design problem.
A well-designed Web page should not require right-left scrolling,
especially for text.

--

David E. Ross
<http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <http://www.mozilla.org/>.
Jul 23 '05 #4
> >http://www.ortonage.com. So far, I've verified that the server mime
types
are configured correctly on the web server (MS IIS).


No they're not.


Ok, I'll have to dig into why IIS is not transmitting the content-type
header even though it is configured to do so. I'm guessing that IIS is
confused because I modify the URL before processing. The fix may be to
force the content-type header through the dynamic page generation sequence
instead of relying on the server.

I assume then that the meta tag for content-type is of little value to the
W3C validator and I assume then that the browsers must either use the meta
tag or assume text/html in the absence of the content-type header.

Thanks for the response Steve.
Jul 23 '05 #5
> <http://www.htmlhelp.co m/tools/validator/> says everything is OK. The W3C
validator can't parse it. I'll leave it to others to tell you why.
You asked only for a solution to one problem. I have to tell you that from
a design point of view, you have two.

leo


Hi Leo. Yes, I had already ran the same validator but it did not complain,
nor did W3C when I uploaded the page source individually.

Please comment on what you feel are design issues (even if you don't want to
get into why or how to fix them). The site was my first attempt with css and
compliant html so I'm not surprised you feel there are other problems. It
seems to be rendering correctly under recent versions of IE and NS and I
plan to do some testing with additional browsers in the future when time
permits.

Thanks for your time.

Trevor
Jul 23 '05 #6

"David Ross" <no****@nowhere .not> wrote in message
news:41******** *******@nowhere .not...
First of all, the validator is saying there is something wrong with
your server, not with your page. It never even tried to validate
your page.
Makes sense.
You need to have your Web host correct the server's .htaccess file
to define a MIME type for HTML files. It's not unusual for an
individual Web site to also have its own .htaccess file for
esoteric MIME types; I have one. However, your Web server should
already have HTML defined in its master .htaccess.
I didn't know MS IIS had a .htaccess file. I thought .htaccess was used
with linux based web servers only. My IIS GUI shows that text/html is
configured correctly so I'll have to investigate this one further.
However, I can tell you that you definitely have a design problem.
A well-designed Web page should not require right-left scrolling,
especially for text.


Yes, I used absolute positioning in my css and may have used too wide of a
page design. Also, I have only tested it on recent versions of IE and NS so
far so it could be brutal on other browsers at the moment and I wouldn't
even know. I've got some work to do on that end.

Thanks for your feedback.

Trevor
Jul 23 '05 #7
Trevor Orton said the following on 11/13/04 20:55:
"David Ross" <no****@nowhere .not> wrote in message
news:41******** *******@nowhere .not...
You need to have your Web host correct the server's .htaccess file
to define a MIME type for HTML files. It's not unusual for an
individual Web site to also have its own .htaccess file for
esoteric MIME types; I have one. However, your Web server should
already have HTML defined in its master .htaccess.


I didn't know MS IIS had a .htaccess file. I thought .htaccess was used
with linux based web servers only.


AFAIK .htaccess is specific to Apache. But Apache is not Linux based
only, it's a cross platform web server that also runs on Windows. You
might want to give it a try.

--
Regards
Harrie
Jul 23 '05 #8
Trevor Orton said the following on 11/13/04 06:48:
The site uses a URL rewriter so even though the URL appears as static to the
client it gets modified by the server to a dynamic URL before processing and
responding to the client. I'm wondering if the server is not including the
correct content-type in the header information because the ".htm" is
stripped from the URL during processing and before the response is actually
returned to the client side. [..]
Why (stripping the ".htm" part)?
[..] If that is the case, any ideas on how to
rectify the problem?


Maybe by not stripping the stripping the ".htm" part?

--
Regards
Harrie
Jul 23 '05 #9
Trevor Orton wrote:
I didn't know MS IIS had a .htaccess file.
AFAIK, it doesn't.
I thought .htaccess was used with linux based web servers only.


No. It is used with *Apache* only, regardless of operating system. I use
it on Apache/Linux and Apache/Windows.

--
Brian (remove "invalid" to email me)
Jul 23 '05 #10

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

Similar topics

16
2877
by: Terry | last post by:
Hi, This is a newbie's question. I want to preload 4 images and only when all 4 images has been loaded into browser's cache, I want to start a slideshow() function. If images are not completed loaded into cache, the slideshow doesn't look very nice. I am not sure how/when to call the slideshow() function to make sure it starts after the preload has been completed.
195
8507
by: Torbjørn Pettersen | last post by:
As you might have noticed I'm trying to clean up my web site's HTML code. The way I do it is simply more or less redoing to complete site, testing it on a web server I have set up on my local network. I have downloaded, and installed CSE HTML Validator Pro, but I don't get the same results with that as I do with the online validator on W3.org. And I can't upload files to W3.org either, due to all the ASP code I use.
10
2279
by: Chris Simon | last post by:
A bit puzzled by this... 1. Ask the validator to look at http://www.nantperis.org.uk/index.php.en (the exact filename of the page) and it brings back an error: 300 Multiple Choices. I could understand that if the filename was specified without the .en as there are more than one version of the page in different languages. Is it stripping the .en? Has anyone managed to get it to find a .en file
22
2458
by: Trammel | last post by:
Hi, I am here to request support from anyone that has idea's on cross-browser HTML (Mainly Firefox and IE). My personal website http://trammel.no-ip.info works fine on Firefox but IE decides to crush the left table (ingnoring that there is no breakable spaces). I tried using nowrap already and IE still forces a wrap of the text in the menu... thats why I tried using non-breaking spaces instead of normal ones... so there was nowhere to...
12
45307
by: thomas_jedenfelt_1 | last post by:
Hi everyone, Is the W3C HTML Validator in error when it returns <br /> as valid for HTML 4.01 Strict doctype? In March 2004 , the Validator returned <br />, <hr /> and <img /> as invalid for HTML 4.01 Strict. Liam Quinn said "You can't mix HTML and XHTML. You need to choose one or the other syntax."
47
10296
by: Chuck | last post by:
Is there any logical reason why one should convert if css is already being used? What possible, immediate, benefit would there be? I am at a loss to see what, pragmatic, difference it would make.
16
2038
by: graham.reeds | last post by:
I am updating a website that uses a countdown script embedded on the page. When the page is served the var's are set to how long the countdown has left in minutes and seconds, but the rest of the script is left untouched. However I want to take the script out of the page and have it as a seperate file that can be cached, reducing serving costs - the page gets hit a couple of thousand times per day, sometimes as high a 5K, so any...
40
5577
by: VK | last post by:
Hi, After the response on my request from W3C I'm still unclear about Tidy vs. Validator discrepansies. That started with <IFRAME> issue, but there is more as I know. Anyway, this very basic HTML page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html401/strict.dtd"> <html> <head>
13
1932
by: Jukka K. Korpela | last post by:
Since there is no authoritative specification on how to map presentational HTML elements and attributes to CSS, and even no informal description (as far as I can see), I finally composed one: http://www.cs.tut.fi/~jkorpela/html2css.html The idea was to create something simple, but now it looks rather messy. Anyway, maybe it's of some use. I do _not_ recommend converting old pages (using presentational HTML) to anything, in general, but...
2
2099
by: Bruno Schneider | last post by:
I've seen this page, that seems invalid to me. Doctype is incomplete and it does not have a <bodytag. However, W3C validator validates it as HTML 4.01 strict, even when I force the DOCTYPE. I think it should be a bug in the validator, but perhaps, I missed something. What do you think? Page: http://www.bcc.ufla.br/~lpgomes/ Validator:
0
8174
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8624
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8336
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8478
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7164
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2607
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1786
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.