2
window.close();//false

window.open(location, '_self', '');
window.close();//false

open(location, '_self').close();//false

Chrome 45.0.2454.85 m, Firefox also has the problem.

Please help...

Console option screenshot

Keefe
  • 31
  • 1
  • 1
  • 4

1 Answers1

3

You should store your opened window in a variable.

var popup = window.open(location, '_blank', '');
popup.close();

EDIT: Opening in _self does not work since you open a new page in the same screen, you might want to do _blank like i've edited.

Roboroads
  • 1,602
  • 1
  • 13
  • 24