Cancelling JavaScript execution in chrome after redirect (and cancelling requests) -
the scenario in our website follows:
- user clicks button
- we start timer 3seconds
- we make backend request in meantime
- 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
Post a Comment