Snapshot timing

SEO.js automatically finds out when a page is rendered completely. When loading a page we wait until all asynchronous requests are completed and add some extra time to let the JavaScript code execute completely.

Set it explicitly

You can explicitly tell our renderer when to take the snapshot. Add the following piece of JavaScript to the HTML <head> section of your pages to tell our renderer to wait until window.seojsSnapshotReady = true.

<script type="text/javascript">
window.seojsSnapshotReady = false;
</script>

When all necessary AJAX resources have been loaded and rendered you need to set it to true. Otherwise our headless browser keeps waiting for up to 60 seconds.

window.seojsSnapshotReady = true;