localhost is not opening in firefox but working fine in IE8
i am working in a apache web application. i completed a project with this and its working fine in IE8. Now i tried this same in firefox ,opera and chrome it results the source code.
when i typed http://localhost/, it results,
<html>
<head>
<title>X2A.biz</title>
<script type="text/javascript">
window.location.href = "../pages/X2AFrame.htm"
</script>
</head>
<body>
</body>
</html>
i tried with html transitional doc type also. In X2AFrame.htm, i have frameset.
can any one help in this?开发者_运维知识库 pls...
That's because you didn't configure your web server correctly - it serves this page with MIME type text/plain
instead of text/html
. IE does content sniffing and detects that you gave it an HTML page, other browsers don't (the standard-compliant approach). So you need to fix the configuration of your web server, in Apache you can use the AddType directive:
AddType text/html .htm
Firefox and Chrome support a Javascript debugger in them. For firefox, you can install the firebug extension, but it's already there in chrome, so :
open your page in chrome, press ctrl+shift+j to open up a javacsript debugger, and look at ther error there, it should point you in the direction of what's going wrong.
hi friends i found the issue... In httpd.conf file,LoadModule mime_module modules/mod_mime.so was commented for me... thats the issue..
精彩评论