I am using this code which is working perfectly fine in chrome and latest version of safari but not working on safari older version.my ajax is unable to get the aitoggle value and pass the aitoggle value as null and it's working as infinite loop..how can i resolve this problem.
function toggle() {
try
{
var datastring = "&token=" + msgStartSession + "&endUserName=" + endUserName + "&imgUrl=" + imgUrl + "&imgDomain=" + imgDomain + "&myDeviceTokenId=" + imgDomainTmp + "_" + myDeviceTokenId + "&action=updateChatInfo";
$.ajax({
type: "POST",
url: base + "/AppUserListServiceProvider",
data: datastring,
dataType: "text",
cache: false,
async: false,
success: function(data) {
data = JSON.parse(data);
msgStartSession = data["randomNew"];
aitoggle = data["ai_toggle"].toLowerCase();
aitoggle = aitoggle.toLowerCase();
},
});
if (aitoggle == "") {
window.location.reload();
}
}
catch (e) {
}
return aitoggle;
}