Question

JP Morgan Chase & Company
US
Last activity: 16 Aug 2019 13:59 EDT
Refresh the harness periodically when it is an active thread
We have written a javascript to reload the harness periodically that gets called when the harness is loaded. Currently we are using Settimeout function to reload the page. Our requirement is to refresh the harness only when it is active thread in UI, but this function is executing even when the user traverses to other harness (Review or Dashboard or Reports). Now, when ever the user traverses to other menu items in the portal, this harness thread is still in the background and the script is executing continuously.
Is there any other way we can refresh the harness periodically when it is active (Displayed in UI) and not refresh it if it is not active thread?