Single-window browsing and pop-up handling
On many devices, it is not always practical to allow Web pages to open several windows. Several simultaneously open windows increases memory usage and may decrease the performance of the system. Also, it may not be desirable for a device to have a user interface with several windows.
Pop-up handling
If the integration supports multiple tabs and/or windows, Opera's pop-up handling should be sufficient to avoid displaying unwanted pop-ups that might decrease performance. To prevent Web pages from creating new windows without user interaction, set the opera.ini setting Ignore Unrequested Popups to 1.
Single-window browsing
If the integration is designed for a user interface with only one window, it is not enough to use pop-up blocking. Web pages can, for example, be designed to open new pages when the user submits a form. Even if Ignore Unrequested Popups is enabled, Opera will try to open a new window since this operation was triggered by the user.
To solve this problem, there are two more settings available, which further control how requests for new windows are controlled. These settings are called Single Window Browsing and Ignore Target.
Single Window Browsing setting
If the setting Single Window Browsing is enabled the following events will occur:
- Normal HTML links that normally open in a new window will be opened in the current window instead.
- JavaScript calls to open a new window with a specified URL will open these links in the current window instead.
The Single Window Browsing setting can be enabled in the opera.ini file as follows:
[User Prefs] Single Window Browsing = 1
Ignore Target setting
The Ignore Target setting disallows documents from creating all kinds of new windows and it is enabled in the opera.ini file as follows:
[User Prefs] Ignore Target = 1
Known limitations
Some Web sites use JavaScript calls in one window to control the behaviour of another window. This makes implementing single-window browsing problematic as it is impossible to know if or when it is safe to discard the first page. A typical example is when a site opens an empty window and later opens a URL in it. When Opera encounters a JavaScript call to open a new window without a URL it will prompt the platform for a decision. So the behaviour in this case can be different in different Opera Powered devices.