<p dir="auto">Hi, I'm noticing that the back button doesn't trigger getInitialProps.</p>
<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?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Steps to Reproduce</h2>
<ol dir="auto">
<li>Go to <a href="https://wecured.com/condition/depression" rel="nofollow">https://wecured.com/condition/depression</a></li>
<li>Click on 'Symptoms' tab, which will trigger a shallow client transition.</li>
<li>Click on 'hay fever' on the left rail, which will trigger a client transition.</li>
<li>Press back.<br>
Expected: page should end up on the depression page with symptoms tab.<br>
Actual: page ended up on hay fever on the symptoms tab.</li>
</ol>
<p dir="auto">I did some debugging and found that this is because getInitialProps wasn't called.</p>
<p dir="auto">I have an app with a single page <code class="notranslate">index.js</code>, and I parse the query parameters in <code class="notranslate">getInitialProps</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="static async getInitialProps ({query}) {
	console.log('PAGE', query.screenId);
	try {
		const projectData = await ProjectLoader.loadProject(query);
		return projectData;
	}
	catch (err) {
		console.error(err);
	}
};"><pre class="notranslate"><code class="notranslate">static async getInitialProps ({query}) {
	console.log('PAGE', query.screenId);
	try {
		const projectData = await ProjectLoader.loadProject(query);
		return projectData;
	}
	catch (err) {
		console.error(err);
	}
};
</code></pre></div>
<p dir="auto">I use <code class="notranslate">&lt;Link href={pathname, query} prefetch&gt;</code> tags to build my links.</p>
<p dir="auto">The <code class="notranslate">screenId</code> property is key to finding the right page to render.</p>
<p dir="auto">However, when I use the back button in the browser to a page without <code class="notranslate">screenId</code> set, <code class="notranslate">getInitialProps</code> doesn’t return <code class="notranslate">screenId:undefined</code> as expected, but another value (as you can see in the console log):</p>
<p dir="auto"><a href="https://i.stack.imgur.com/pWUXE.gif" rel="nofollow"><img src="https://camo.githubusercontent.com/bb7ac2040b7623677b1ca870bd1c97c22659c4edf045bd3c817326ae19f06aa4/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f70575558452e676966" alt="getInitialProps not working with history" data-animated-image="" data-canonical-src="https://i.stack.imgur.com/pWUXE.gif" style="max-width: 100%;"></a></p>
<p dir="auto">When I refresh the page, I get the right properties and see the correct results.</p>
<p dir="auto">The “imaginary” <code class="notranslate">screenId</code> is actually a valid value, but I have no idea where this value comes from.</p>
<p dir="auto">Why is this happening?</p>