Jquery Ajax call return 403 status

I have a jquery Ajax call implemented for a keepalive session, this keepAlive () method will call every 20 minutes

    function keepAlive() {
        $.ajax({ type: "POST",
            url: "KeepAliveDummy.aspx", cache: false
        });
    }

This call occurs when the contents of a third party are loaded into a set of frames,

I get 403 http status (check through violinist) on this request, Will this affect the end result of the session update?

+4
source share
2 answers

Since your question is related to handling 403 error (will this affect the end result of updating session time?), And what is 403.

So, handle this error, you can register or notify.

  $.ajax({
      type: "POST",
      url: "KeepAliveDummy.aspx",
      success: function (response) {
          //session refreshed
      },
      error: function (xhr, ajaxOptions, thrownError) {
        if(xhr.status==403) {
            //handle error
        }
      }
    });
+5
source

about 403:

403 , . [2] 401, . [2]

(, ), ajax. 401 , 403.

, .

0

All Articles