setInterval stops after Ajax request

前端 未结 7 2162
不知归路
不知归路 2021-01-03 15:50

I\'m using Asp.net MVC and I want my partial view to refresh on an interval, which it does until I make an unrelated Ajax request, then it stops.

Here are a few simp

7条回答
  •  太阳男子
    2021-01-03 16:37

    I just dealt with this same type of issue with setInterval. What I did to make it continue to refresh was after ten requests (interval firings), clear the interval timer and create it again. Effectively restarting it.

提交回复
热议问题