Spawning new browser windows and altering the current window are very common uses for
JavaScript. These are also very annoying and unsafe, as you can never be sure if the visitor of
your web page can deal with resized windows or will be notified by her user agent when there
is a new window. Think of screen reader users listening to your site or text browser users.
Windows have been used for unsolicited advertising (pop-up windows) and executing
code in hidden windows for data retrieval purposes (phishing) in the past, which is why
browser vendors and third-party software providers have come up with a lot of software
and browser settings to stop this kind of abuse. Mozilla Firefox users can choose whether
they want pop-up windows and what properties of the window can be changed by JavaScript
as shown in Figure 6-11.
Figure 6-11. The advanced JavaScript settings in Mozilla Firefox
Other browsers like MSIE 7 or Opera 8 disallow hiding the location bar in new windows
and can impose size and position constraints on new windows.