<p dir="auto">The expected behavior (like other browser behave) is</p>
<ul dir="auto">
<li>Reloading does not creates history items</li>
<li>redirects does not creates history items</li>
</ul>
<p dir="auto">In atom shell:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;webview id=&quot;foo&quot; src=&quot;http://www.github.com/&quot; style=&quot;width:640px; height:480px&quot;&gt;&lt;/webview&gt;
&lt;script&gt;
    var webview = document.getElementById(&quot;foo&quot;);
    // wait for page being loaded
    webview.canGoBack(); // returns false  
    webview.reload();
    // wait for page being loaded
    webview.canGoBack(); // returns true but should returns false
&lt;/script&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">webview</span> <span class="pl-c1">id</span>="<span class="pl-s">foo</span>" <span class="pl-c1">src</span>="<span class="pl-s">http://www.github.com/</span>" <span class="pl-c1">style</span>="<span class="pl-s">width:640px; height:480px</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">webview</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span>
    <span class="pl-k">var</span> <span class="pl-s1">webview</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementById</span><span class="pl-kos">(</span><span class="pl-s">"foo"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-c">// wait for page being loaded</span>
    <span class="pl-s1">webview</span><span class="pl-kos">.</span><span class="pl-en">canGoBack</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// returns false  </span>
    <span class="pl-s1">webview</span><span class="pl-kos">.</span><span class="pl-en">reload</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-c">// wait for page being loaded</span>
    <span class="pl-s1">webview</span><span class="pl-kos">.</span><span class="pl-en">canGoBack</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// returns true but should returns false</span>
<span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">When atom-shell is initially loaded <code class="notranslate">window.history.back()</code> works correctly doing nothing. After a refresh, problems arise calling <code class="notranslate">window.history.back()</code>. It appears that history for a <code class="notranslate">BrowserWindow</code> is not persisted across a refresh as is the case in the Chrome browser and other issues come into play.</p>
<p dir="auto">So steps to repro are, refresh and <code class="notranslate">window.history.back()</code>, if the browser is navigated anywhere several calls to <code class="notranslate">window.history.back()</code> will cause the same behavior after a refresh.</p>
<p dir="auto">I am using the <code class="notranslate">v0.21.1</code> release version of <code class="notranslate">atom-shell</code>.</p>