In JS, there is a way to open a window and close it immediately so that it does not open in a new tab , I just want to open a window (for example, in the background, if possible) do some checking and close it immediately, without the effect of opening a new tab , maybe is it?
Something like this, but without opening the window ...
var popup = window.open("http://www.google.com"); popup.close();
UPDATE: Here is a solution that I found, but it sometimes changes, and I want to avoid it ...
function goNewWin() { var TheNewWin = window.open("http://www.yahoo.com", 'TheNewpop', 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1'); TheNewWin.blur(); TheNewWin.close(); }
source share