Home » Javascript » How to open new window with new session always in IE

How to open new window with new session always in IE

Posted by: admin November 1, 2017 Leave a comment

Questions:

How to open new window with new session always in IE?

in java-script method i have an window.open(appurl,'_blank',"height=500,width=500")

if i call the java-script method, application needs to open in new window with new session(Alt+F+I) in IE browser.

if i call the java-script method once again, application needs to open in new window freshly.should not share the existing window sessions.

Answers:

As I recall, the trick is to use a unique name every time you open a window. You should also set a unique variable when opening: var win1=window.open(w1…, var win2=window.open(w2… This is so that you can close individual windows in JS.

At the moment, you are naming every window ‘_blank’. By default this will open a new window, but if you open a second window with the same ‘_blank’ name, the first window gets replaced.

Try keeping a counter and naming windows …1, …2 etc.