3 <title>Prerender fragment testing under location.hash change
</title>
6 if (window
.location
.hash
=== "") {
7 window
.location
.hash
= "fragment";
10 var pageWasPrerendered
= false;
12 function DidPrerenderPass() {
13 pageWasPrerendered
= true;
14 return window
.location
.hash
=== "#fragment";
17 // Make sure DidPrerenderPass() was called first. Otherwise, the page was
18 // most likely reloaded instead of using the prerendered page.
19 function DidDisplayPass() {
20 return pageWasPrerendered
&& window
.location
.hash
=== "#fragment";
27 <a name=
"fragment">Fragment
</a>