<p>How can I close a browser window without receiving the <em>Do you want to close this window</em> prompt?</p>

<p>The prompt occurs when I use the <code>window.close();</code> function.</p>

The best solution I have found is:
```
```
this.focus();
self.opener=this;
self.close();
```
```