Does CrowdHandler's Javascript integration work with SPA's?

If you followed our Javascript getting started guide or our Javascript installation guide to install CrowdHandler on your site/application, out of the box, CrowdHandler checks will only be performed on a full DOM reload i.e. when the browser is hard refreshed and the page is fetched from your web server. With SPA's this can significantly reduce the effectiveness of CrowdHandler's protection as site navigation will not typically trigger DOM reloads resulting in users "going dark" to CrowdHandler after their first hit.

To make CrowdHandler's JS integration work more effectively with your SPA you can flag to CrowdHandler that a SPA is being used. This flag will trigger additional functionality in the CrowdHandler JS that will cause checks to be performed whenever the URL (location.href) is changed regardless of whether a DOM reload has occurred.  

How can I flag that I'm using a SPA?

Amend the CrowdHandler script tag that you included on your site to include the spa=true param/value. This should be placed AFTER the id/value.

<script src="https://wait.crowdhandler.com/js/latest/main.js?id=your-public-key&spa=true</script>

If you wish to secure your protection by placing CrowdHandler in front of your API calls, our advanced guide explains how to do this: Protecting a Single Page Application (SPA) - Advanced Integration