PopupTimeout Property (.NET)

 

Type: Integer

 

Note: This property is deprecated as of BrowserHawk 12. Setting it no longer serves any purpose and is ignored.  This is because the PopupBlocked check has been rewritten to instantly detect blocked popups. Therefore no delay is needed, which was the original purpose of this property.

 

This value defines the threshold for how many milliseconds the popup window used in the PopupsBlocked test has to open before BrowserHawk determines that popups are blocked. By default this value is 2000 milliseconds (2 seconds).

 

When testing for the presence of the test popup window (or your real popup window if using the advanced option as explained above BrowserHawk will wait up to X milliseconds for this window to load.

 

If the popup window is not loaded within this amount of time, then the test will complete and PopupsBlocked will be set to True since the popup did not load successfully. In the case where popups are not blocked, BrowserHawk will not need to wait and the test will complete without waiting for this timeout period, and PopupsBlocked will be set to False.

 

The default value should suffice in most cases. However you may want to tweak this for optimal efficiency. The advantage to lowering this number is that the time it takes to detect blocked popups will be less when popups are blocked.

 

For example, by default it will take 2 seconds to detect when popups are blocked (and detected instantly when they are not). If you lower the PopupTimeout value to 1000 ms (1 second) then it will only take one second to detect when popups are blocked.

 

The downside to lowering this number, however, is that even though the test popup is no more than 1K of data, it still can take a second or two for the test popup to be loaded from your web server once BrowserHawk attempts to pop it up, just as a result of typical internet latency.

 

This latency is mainly a function of the visitor's Internet connection, but can also be affected by the load of your connectivity and web server. For example, with a good broadband connection a setting of 1000 ms (1 second) would likely be sufficient. And a local network connection such as when running on a LAN could use even lower settings, such as 250 ms. Likewise a setting of 1500 or 2000 would likely be needed to accurately test dial up users. When experimenting with this setting be sure to test over a variety of internet connection types including dial-up.

 

In summary, setting this timeout value is a tradeoff between testing time and accuracy of the test. Set it too low and you run a risk of detecting popups as blocked when they are not. Set it too high and it will take longer than necessary to determine when popups are indeed blocked. In either event the test finishes immediately for visitors that have not blocked popups (the PopupTimeout value does not come into play).

 

We have found 2000 ms to be reliable setting. Generally we would not recommend lowering it below 1250 but you can always experiment. If you find cases where it is detecting popups as blocked, when they indeed are not, then you need to raise this value back toward 2000 (or possible higher depending on the type of connections your visitors are using). If a value is not specifically set than it will default to 2000 ms.

 

Note: If you are using the advanced option to load your own popup window instead of the default BrowserHawk popup, it may be necessary for you to raise the timeout if you have several kilobytes of data you are loading.

 

Tip: See the source for the BrowserHawk popupcheck.aspx sample (\Program Files\cyScape\BrowserHawk\samples\dotnet) for more details on detecting blocked popups.

 

See Also:

PopupsBlocked Property (.NET)

PopupFileName Property (.NET)

PopupWindowFeatures Property (.NET)

PopupWindowName Property (.NET)