Execute JavaScript code once a browser window/tab is opened for the first time
<p>Is there a way to execute JavaScript code only once when a window or a tab in a browser is opened and then never again for the whole life-cycle of this window/tab (even when navigated away)?</p>