Actions continuing after I leave the page

Resolved

Hello,

I have a page with a set of actions that get triggered on Page Load. Among these actions there is a periodic API call. I've noticed that when the page is refreshed, or when we leave the page, the periodic action keeps running.

Is this the expected behavior?

In my case it causes duplicate and excessive API calls, and I was simply expecting the actions On Page Load to be interrupted when the user leaves the page...

Alternatively I checked the advanced settings for the API call, and it seems we can't set a cache duration or time to live for the API call, so caching it won't do it in my case.

Does anybody have explanations / a solution on how to prevent these actions to keep running in the background when we leave the page?

Thank you.

2
10 replies