Wait For Change

Key: waitForChange

For carts that use JS for navigation ie React, VueJS etc we may need to re-scrape the page not on page load, but on specific cues.

Here is an example that simply waits for the URL to change:

"waitForChange": {
  "type": "var",
  "value": "location.pathname"
}

This may not be enough though, as the URL may change before the new content has fully loaded. If this is the case, and there is no simple way of telling if a page load has completed, you may need to add a variable to the page that is updated on page load.

For example you may update "window.pageLoads", adding to it each time a page loads.

"waitForChange": {
  "type" "var",
  "value": "pageLoads"
}

results matching ""

    No results matching ""