Start page

This demo uses local storage to register prerenders, and then reports them (to the console, rather than via a beacon) from the calling page when you switch tabs or navigate away.

If you navigate to a same-origin page, the console will report the number of prerenders and activations for the referring page.

If you navigate to a cross-origin page, the totals will be logged in the console. You will need to click back to see them.

Note: this demo does not handle multiple tabs opening the same page.

This link should be prerendered

This link should also be prerendered

This link should not be prerendered

Switch tabs to report prerenders early.

This is a cross-origin link to example.com.



  

  

  

View the code on Glitch