I am developing an app that is fetching information from an API. I want to refresh the current window every 10 sec so as to check for new messages. The page should be refreshed in the background.
2 Answers
Sorry,You mean,You want to hot your API for checking Updates after every 10 Sec.if this is the case,then no need to refresh the window,Just use setTimeout,where you are hitting your APi,Your Window will show you,Updated data.
Might it helps. Thanks.
Your app crashes because you have memory leaks, not because of the small interval time. Also you should refresh the window only if the data you get through the API has something new to show.
Your Answer
Think you can help? Login to answer this question!