Q
|
On my development machine the PopupsBlocked property always returns False, even when I configure IE to block popups. When testing this against the production server it works fine. Why is this?
|
A
|
The issue has to do with how IE treats your security settings when you are using "localhost" or a machine name in the URL. Essentially it grants higher security privileges and allows the popup, even though you turned your blocker on.
Once in production when you are accessing the pop-up check using the domain name of the site you will not see this issue.
To work around this so you can test in development there are two ways to go about this. 1) Internet Options-> Security Tab-> click the Sites button, uncheck the last three boxes. This essentially excludes pages running from the localhost url from having elevated privileges; or 2) In your hosts file create a dummy domain like www.mydev.com and map it to your dev boxes IP that runs your site, such as 127.0.0.1. Then use http://www.mydev.com/whatever to access the pages, instead of http://localhost.
|