Global monitoring of ajax operations, solution to user session failure, ajaxsession
Global monitoring of ajax operations and solutions to user session failures
JQuery (function ($) {// back up jquery's ajax method var _ ajax =$. ajax; // rewrite the ajax method. First, judge that the success function is being executed during login $. ajax = function (opt) {var _ success = opt & opt. success | function (a, B) {}; var _ opt = $. extend (opt, {success: function (data, textStatus) {try {if (data. sessionstatus = false) {// The user fails to perform the operation // return ;}} catch (e) {}_ success (data, textStatus );}}); _ ajax (_ opt );};});
In the above ajax operation global monitoring, the solution to user session failure is all the content shared by xiaobian. I hope to give you a reference, and I hope you can provide more support for the customer's house.