Browser waits for ajax call to complete even after abort has been called (jQuery)

后端 未结 7 1582
野趣味
野趣味 2020-12-01 05:27

I have some (potentially) long-running ajax calls that I would like to abort if the user navigates to another page. The following jQuery code calls abort on all pending XMLH

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-01 05:58

    For ASP.NET MVC you can decorate the controller with the following [SessionState(System.Web.SessionState.SessionStateBehavior.ReadOnly)].

    More information can be found here ... http://johnculviner.com/asp-net-concurrent-ajax-requests-and-session-state-blocking/

提交回复
热议问题