Hello reader's in this tutorial we will discuss how to open a new stripped browser window?, Some time we want to open a web page in a new, stripped-down, fixed-size browser window.
To open a new fixed size window we use window.open method to open a new window by passing an optional parameters for that to load a URL and to add a window name.
Syntax:-
var newWindow = window.open("http://oreilly.com", "namedWindow");
Output:- When you run this code it will open a new in a new tab.
There are three parameters in the earlier practice which can be used the URL, the window name, and the window features as a string. If we have not written the URL, the window will open a blank tab as "about:blank". The "_blank" will be used in a case when the name is not given, means a window will open in a new window everytime when the code runs and the default pattern will be used when the features string is not given.
When the HTML5 comes to the browser the window.open method is changed it make the features string unsupported and the fourth parameter will be replaced by a boolean value that reveals if the URL replaces the content in the open window and also it will remove the URL existing in the window's history.
Popup window prevention will be triggered by the new window, and the behaviour can be changed for different browsers.
For example, Firefox 3.x, new window will be opened as a new tab by default, so we can configure the user preference differently.
0 Comment(s)