Odd behaviour in web page when page uses 'localhost' vs machine's name

一曲冷凌霜 提交于 2019-12-08 06:56:27

问题


I have a web page which I am developing where I can drag divs on the page. It works fine in all the browsers except IE6 & IE7 where when I drag a div the div shows beneath the dropped on div instead of on top of it. This is not the problem at hand per se. I know IE6 & IE7 have issues with z-index settings. This is a complicated page with different divs have different z-index values.

The page works fine in IE8 IF the url on my machine uses 'localhost'. If I switch the url to use my machine's name, the page exhibits the behavior where the div shows beneath the other div as explained earlier. I don't know why this is happening when it's the same machine, the same page coming from the same file. The only variable is the url for domain name place. I am supporting IE8 only as its the standard at the company.

If I use the machine ip address the page works. In short, if I use localhost or ip address it works fine. If I use my machine's name it misbehaves.

I cleared IE8's cache and rebooted the machine. The page exists only on my machine because I am creating it so there's no chance it's coming from anywhere else.

I can't think of why this is happening. IE8 is behaving differently for the same page when the server name is different in the url.

Any hints?


回答1:


Most likely IE is switching between standards and quirks mode for some reason, so your runtime environments aren't exactly the same. Sad, but that's how Mr. Gates wants to roll - roll in his dough while laughing at the rest of us.



来源:https://stackoverflow.com/questions/4951127/odd-behaviour-in-web-page-when-page-uses-localhost-vs-machines-name

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