转自:http://blog.csdn.net/yeyicsdn/article/details/50032787

参考网址:http://www.cnblogs.com/RachelChen/p/5433881.html

修改了前台全局ajax部分代码,如下:

$(document).ajaxComplete(function (event, xhr, settings) {
        //通过XMLHttpRequest取得响应头,sessionstatus,
        var sessionstatus = xhr.getResponseHeader("sessionstatus");
            if (sessionstatus == "timeout") {
                //如果超时就处理 ,指定要跳转的页面
                alert("您已下线,请重新登陆!");
                window.location.href = "/Login/Index";
            }
    });

 

相关文章:

  • 2021-08-13
  • 2021-10-24
  • 2022-12-23
  • 2021-06-12
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2021-09-15
猜你喜欢
  • 2021-07-10
  • 2022-12-23
  • 2021-12-11
  • 2021-12-23
  • 2021-12-10
  • 2022-12-23
  • 2021-07-24
相关资源
相似解决方案