localhost is not opening in firefox but working fine in IE8

主宰稳场 提交于 2020-01-03 04:58:08

问题


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...


回答1:


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



回答2:


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.




回答3:


hi friends i found the issue... In httpd.conf file,LoadModule mime_module modules/mod_mime.so was commented for me... thats the issue..



来源:https://stackoverflow.com/questions/7332604/localhost-is-not-opening-in-firefox-but-working-fine-in-ie8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!