CGI-script doesn't work in Firefox CGI-script doesn't work in Firefox bosarve (Programmer) (OP) 11 Jan 06 13:34 Working with HTML, CGI and MySQL. My pages looks perfekt with IE, but when I open them with Firefox I just see my code. Eg http://www.grindange.com/os/toplist.cgi or http://www.grindange.com/os/guess.shtmlAny one who can explain why? RE: CGI-script doesn't work in Firefox KevinADC (TechnicalUser) 11 Jan 06 14:35 www.grindange.com not found RE: CGI-script doesn't work in Firefox ChrisHunt (Programmer) 11 Jan 06 18:59 Looks likee you aren't sending the proper MIME type. Before you start pumping out the HTML, you need to send a header telling the browser to expect HTML instead of plain text:something like this:CODEprint "Content-type: text/html\n\n"; -- Chris HuntWebmaster & TragedianExtra Connections Ltd RE: CGI-script doesn't work in Firefox KevinADC (TechnicalUser) 11 Jan 06 20:55 Is this some type of embedded perl code? Maybe firefox needs to be setup in some way to run the embedded perl code if that's the case. RE: CGI-script doesn't work in Firefox Ghodmode (Programmer) 12 Jan 06 00:13 ChrisHunt is right on the money. While his example does resemble a Perl statement, that's not his point. The CGI program must tell the server what type of document it is returning.Quote (NCSA CGI Primer):CGI programs can return a myriad of document types. They can send back an image to the client, and HTML document, a plaintext document, or perhaps even an audio clip. They can also return references to other documents. The client must know what kind of document you're sending it so it can present it accordingly. In order for the client to know this, your CGI program must tell the server what type of document it is returning. NCSA CGI PrimerThe difference between Firefox and IE in this context is that, if the document doesn't specify it's content type, IE assumes text/html and Firefox simply shows you the document.I feel that Firefox's approach in this case is more appropriate, but I'm not sure that either browser is breaking any rules.CGI and Perl (even Embedded Perl) run on the server side. Neither Firefox or IE can run embedded Perl... but that was just a simple print command that is almost the same in most programming languages.Try one of these:CODE/* Only one newline needed for Java because println already appends one */system.out.println( "Content-Type: text-html\n" );/* C */printf( "Content-Type: text/html\n\n" );/* PHP or Perl */print( "Content-Type: text/html\n\n" );# bash, bourne, or korn shellecho "Content-Type: text/html\n\n";The important part is that it has to be the first line of output.In summary, I never like to make this the only response, but... RTFM ---- Ghodmode RE: CGI-script doesn't work in Firefox KevinADC (TechnicalUser) 12 Jan 06 04:04 well, as far as I know, if there is no http header printed, the script will die when it tries to print something to the browser, so there must be some type of header. Maybe the OP will post his code (if it's not too long). RE: CGI-script doesn't work in Firefox bosarve (Programmer) (OP) 12 Jan 06 04:50 Thanks for input, I will try and see if it's work!