Cancelling JavaScript execution in chrome after redirect (and cancelling requests) -




the scenario in our website follows:

  1. user clicks button
  2. we start timer 3seconds
  3. we make backend request in meantime
  4. we redirect user different website after 3s

what observing is, @ end of 3 seconds, chrome cancels on-going request made in step 3 (since has not completed). code configured in such way retries if ongoing request fails. expecting chrome cancel further code execution after canceling request. chrome continues execute retry. have 1 cancelled call , 1 retry request (even though 1st call might have succeeded). result end lot of duplicates.

is there way force chrome stop executing scripts after has decided redirect new page , cancelled 1st request?





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -