Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape shows code, though IE shows site (ASP)

Status
Not open for further replies.

Waidesworld

Technical User
Oct 1, 2002
121
US
I am working with a pre-designed site and when I bring it up in Netscape it shows the source code instead of the site. In IE I see hte site. The only thing I see as possibly wrong is the fact that the website is an asp site, index.asp instead of htm. I don't fully understand this. Can someone offer an insight? I have the site in htm format also.
 
MIME types are set in the http server. So it depends on which server you're running on.

Having said that -if it works in IE, then I doubt that it is a server side issue. Seems like the ASP in interpreted correct. Does the page(s) contain any APS or is it in fact pure HTML with another extension?

If it is pure HTML then just skip the .asp files (that's rename them). BTW -the server configuration also deceides search order for URL (folders) where no file name is specified...

Post a link!


Jakob §;O)
 
The reason I pick on mime types is that Netscape tends to be rather more fussy about them than IE. If something looks like a web page, IE tends to display it as one. Netscape wants to be sure.

I don't know much about asp, but you may need/be able to send the relevant header in the asp file itself. Post us a link and we can see for ourselves.

-- Chris Hunt
 
your DTD is incorrect. so strict browsers will render it as text only. IE not being strict and will deal with almost anything thrown at doesn't care.
(MS obviously had FrontPage in mind)

Frameset doctype should be;

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Frameset//EN&quot;>




Chris.

Indifference will be the downfall of mankind, but who cares?
 
According to Netscape 7, it's being sent with a MIME type of &quot;text/plain&quot;, which is what Netscape/Mozilla is rendering it as. IE is looking at the .asp extension and rendering it as HTML.

The DOCTYPE is a red herring, a missing or malformed one would cause the page to render HTML in &quot;quirks&quot; mode instead of standards-compliant, it won't make it show source code.

Like I said I'm not an asp person, but looking around the W3Schools asp pages - - it seems that you can set the mime header explicitly by adding this command to your files (my guess is it would have to go at the very start):
[tt]
<%
Response.ContentType=&quot;text/html&quot;
%>
[/tt]
You could, and probably should, configure the server to send the correct mime type with files with a .asp extension, though again doing so is outside my area of expertise. Do you know what kind of server you're running on?

-- Chris Hunt
 
You know you don't have to give the page's extension .ASP unless it is an actual .ASP page (100% dynamic) so the server can render it.

Try adding this above your <HTML> tag

<%@ Language=VBScript %>
<%
Option Explicit
%>
 
I think that until I have more time to spend learning this stuff I will revert to html with the pages I was given. Thansk for all you help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top