How to redirect in WebformHandler after submitting Ajax form I'm trying to redirect to a results page after a form that uses Ajax is submitted. The form is a semi long multi step form, so Ajax is enabled for the user experience.
I have created a new WebformHandler and I'm using the confirmForm() method, but I'm having difficulties to make the redirect work. The 'Confirmation' setting in my Webform is set to 'None'. I also don't see errors in the logs.
namespace Drupal\burnout_module\Plugin\WebformHandler;

use Drupal\Core\Form\FormStateInterface;
use Drupal\webform\Plugin\WebformHandlerBase;
use Drupal\webform\WebformSubmissionInterface;

/**
 * Send values to the matching API and get results back, redirects to results page
 *
 * @WebformHandler(
 *   id = &quot;matching_api_handler&quot;,
 *   label = @Translation(&quot;Matching API&quot;),
 *   category = @Translation(&quot;Webform Handler&quot;),
 *   description = @Translation(&quot;Send values to the matching API and get results back, redirects to results page.&quot;),
 *   cardinality = \Drupal\webform\Plugin\WebformHandlerInterface::CARDINALITY_UNLIMITED,
 *   results = \Drupal\webform\Plugin\WebformHandlerInterface::RESULTS_PROCESSED,
 *   submission = \Drupal\webform\Plugin\WebformHandlerInterface::SUBMISSION_REQUIRED,
 * )
 */

class MatchingApiWebformHandler extends WebformHandlerBase {

  /**
   * {@inheritdoc}
   */


  public function confirmForm(array &amp;$form, FormStateInterface $form_state, WebformSubmissionInterface $webform_submission) {

    // Get an array of the values from the submission.
    $values = $webform_submission-&gt;getData();

    // $result = ... code for calculating results with form values


    $url = \Drupal\Core\Url::fromRoute('burnout.match')-&gt;setRouteParameters(array('result' =&gt; json_encode($result)));
    $form_state-&gt;setRedirectUrl($url);

  }

}

I have also tried other possibilities:

Using a RedirectResponse which gave me a 'Headers already sent' error
AjaxResponse with a RedirectCommand, nothing happens, no errors

Hopefully someone can point me in the right direction.
Kind regards
I got it working with another approach, instead I used the form_alter hook and added an ajax submit callback.
See Webform alter with ajax submit callback - field values are empty in callback