4 var pageWasPrerendered
= false;
6 // Make sure plugin was not loaded while prerendering.
7 function DidPrerenderPass() {
8 pageWasPrerendered
= true;
12 // Make sure DidPrerenderPass() was called first. Otherwise, the page was
13 // most likely reloaded instead of using the prerendered page.
14 function DidDisplayPass() {
15 return pageWasPrerendered
;
19 var xhr
= new XMLHttpRequest();
20 xhr
.onreadystatechange = function() {
21 if(xhr
.readyState
== 4) {
22 if(xhr
.status
== 200) {
23 document
.getElementById("dynamic").innerHTML
=
24 "Received:" + xhr
.responseText
;
26 document
.getElementById("dynamic").innerHTML
=
27 "Error code: " + xhr
.status
;
32 xhr
.open("GET", "prerender_xhr_get.html", true);
41 Waiting for XHR response.