Forum Moderators: open
Can anybody tell me where the problem lies?
Michal Cibor
This is part of the code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>TRADE-TRANS</title>
<link href="../styl/styl.css" type="text/css" rel="stylesheet">
...
</head>...
Note what the "Content-type" line says. It should be "text/html". Anything else and the html mime type is not configured correctly on the server.
Status: HTTP/1.1 200 OK
Date: Sat, 18 Jun 2005 17:19:58 GMT
Server: Apache-AdvancedExtranetServer/2.0.48 (Mandrake Linux/5mdk) mod_perl/1.99_11 Perl/v5.8.3 mod_ssl/2.0.48 OpenSSL/0.9.7c DAV/2 PHP/4.3.4
Content-Length: 9540
Content-Type: text/html
Last-Modified: Sat, 23 Oct 2004 13:04:00 GMT
ETag: "2f00d7-2544-fe333000"
Accept-Ranges: bytes
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Moreover it doesn't happen all the time, just after few reloads (randomly). Can it be that server is quite slow (P3 500MHz)?
Best regards
Michal Cibor
on not working:
Content type: text/plain; charset=iso-8859-2
However only Mozilla shows that. The same (non working) site in Firefox shows text/html (and still not works).
However if the server really sends that plain, then how can I correct it? It happens randomly. Is there a way to enforce it?
Best regards
Michal Cibor
1. Is the page dynamic in some way?
2. Are you doing some kind of content negotiation?
In any case, instead of trying to untangle the server config, maybe first try adding a Content-type meta tag to the html page in the <head> section.
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
That should stabilize things.
but the html includes
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
the source code may be displayed since the browser may not begin parsing the text and won't read the meta tag.
Of course, browsers may treat the http header Content-Type: text as provisional (until html or whatever is detected). I believe some browsers do this, but Firefox may not.
Kaled.
After your note I added the <meta, but it didn't help.
Maybe if I enforce the header with php it will do some good. I'll try and let you know the result.
The queerest thing is that it happens randomly
If anybody has some more ideas please feel free to answer - I'm open to anything now
Best regards
Michal Cibor
<?php
header("HTTP/1.1 200 OK\n");
header("Cache-Control: private\n");
header("Content-Type: text/html\n");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Best regards
Michal Cibor
PS. If you may have any other ideas, please write!