Odd behaviour in web page when page uses 'localhost' vs machine's name
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 whe开发者_JS百科re 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?
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.
精彩评论