Connecting Tech Pros Worldwide Forums | Help | Site Map

Html Headers are displayed on the webpage

Newbie
 
Join Date: Oct 2008
Posts: 14
#1: Nov 7 '08
Hi all,
I have developed some cgis in c-language for our project. We have only CGIs for developing webpages.
When I start the webserver and request for the webpage.. I see some html headers on the webpage. This problem is not consistent

When i see the source of the webpage... displayed the following contents..


Cache-Control: max-age=10, must-revalidate
Content-type: text/html

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC '-//IETF//DTD HTML//EN'>
  2. <HTML>
  3. <TITLE>Asco Remote Annunciator</TITLE>
  4. <HEAD>
  5. <script src="../javaFun.js"></script><META HTTP-EQUIV='CACHE-CONTROL' CONTENT='public'>
  6. <META HTTP-EQUIV='content-type'         CONTENT='text/html;UC_8set=iso-8859-1'>
  7. </HEAD> <BODY onload='' bgcolor = "#E3E8ED" topmargin="0" leftmargin="0">
  8. <hr>
  9. <table width='100%'>
  10.     <tr>
  11.         <td>
  12.             TEST PAGE
  13.         </td>
  14.     </tr>
  15. </table>
  16. </BODY></HTML>

Expert
 
Join Date: Aug 2008
Posts: 397
#2: Nov 7 '08

re: Html Headers are displayed on the webpage


You may want to start with the w3c validation service: http://validator.w3.org/
Member
 
Join Date: Nov 2008
Posts: 80
#3: Nov 15 '08

re: Html Headers are displayed on the webpage


A quick correction:
Your <title> element must be inside the <head> element:
[HTML]
<HTML>
<HEAD>
<TITLE>Asco Remote Annunciator</TITLE>
</HEAD>
...
...
[/HTML]
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,577
#4: Nov 15 '08

re: Html Headers are displayed on the webpage


Your server is already sending the http header. That is why you see it a second time, plus the html only content.
Reply