cancel
Showing results for 
Search instead for 
Did you mean: 

Basic authentication cache is not being cleared from the firefox browser with using JavaScript code when tries to override Uname,PWD and with response Http 401

Highlighted
New Contributor

Basic authentication cache is not being cleared from the firefox browser with using JavaScript code when tries to override Uname,PWD and with response Http 401

Hi, I am trying to implement logout functionality for Basic authentication for our internal application with the below script.

 function clearCache(){
  var ua= window.navigator.userAgent;
  if(ua.indexOf("MSIE") > 0){
  document.execCommand("ClearAuthenticationCache");
  return true;
  }else{
  $.ajax({
    url: '<%=request.getContextPath()%>/pages/PeleLogout.jsp',
    username: ' ',
    password: ' ',
    statusCode: { 401: function() { //alert('Logged Out') 
    } 
    }
    });
    return true;
  }
  }

This function is working properly when deployed in my local tomcat server, but it is not working after deploying in WebSphere6.1 server..