I called ajax with url with get method but it is automatically redirect on given url on failuer how to stop it? Please help me Thanks in Advance

Viewed 11
$.ajax({
    url : '/workmanager/notification',
    type : 'GET',
    success : function(response){
        var data = response.data;
        setNotification(data);
        data.time = new Date().getTime();
        console.log(data);
        if(data.new_notification){
            playNotificationSound();
        }
        // cookie set with total new jobs,tasks and current time 
        $.cookie("notifications",JSON.stringify(data));
    }
});    

I want to stop redirect on workmanger/notfication url on failuer

0 Answers
Related