<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<ol dir="auto">
<li>I have 2 pages on pages folder: <code class="notranslate">category.js</code>, <code class="notranslate">detail.js</code></li>
<li>Open browser</li>
<li>I go to <code class="notranslate">/category</code></li>
<li>Then go to <code class="notranslate">/detail?id=1</code></li>
<li>Then go to <code class="notranslate">/detail?id=2</code></li>
<li>Press back button on browser -&gt; <strong>nothing happen</strong></li>
<li>Press back button again -&gt; it go to <code class="notranslate">/category</code></li>
</ol>
<p dir="auto">Note: I'm using <code class="notranslate">&lt;Link&gt;</code> component to handle the route change</p>
<h2 dir="auto">Current Behavior</h2>


<p dir="auto">Cannot back to page <code class="notranslate">/detail?id=1</code></p>
<h2 dir="auto">Expected Behavior</h2>

<p dir="auto">Can back to page <code class="notranslate">/detail?id=1</code></p>

<p dir="auto">Thanks.</p>
<p dir="auto">In the firebase examples (I'm using Typescript from the next.js example folder) but have also tried <a href="https://github.com/jthegedus/firebase-functions-next-example">https://github.com/jthegedus/firebase-functions-next-example</a>), it's not clear how to add images - as any attempt to add them to the <code class="notranslate">/src/public</code> folder included in the examples or indeed a <code class="notranslate">/src/static</code> folder (to match what is recommended in the next.js docs) ends in a 404 error for the static resources (at least when running <code class="notranslate">npm run dev</code>).</p>
<p dir="auto">It seems to be a particularity of the way firebase wants the assets (in their public folder) vs the way next.js wants them. A workaround that I came up with is to add an extra build step in <code class="notranslate">package.json</code> that duplicates the assets folder inside <code class="notranslate">src</code> in order to get assets working in <code class="notranslate">dev</code>. You can see more in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="365421869" data-permission-text="Title is private" data-url="https://github.com/jthegedus/firebase-functions-next-example/issues/24" data-hovercard-type="issue" data-hovercard-url="/jthegedus/firebase-functions-next-example/issues/24/hovercard?comment_id=461571124&amp;comment_type=issue_comment" href="https://github.com/jthegedus/firebase-functions-next-example/issues/24#issuecomment-461571124">jthegedus/firebase-functions-next-example#24 (comment)</a> but it seems less than ideal. Is there a clean way to do this?</p>
<p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sampsonjoliver/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sampsonjoliver">@sampsonjoliver</a></p>