Ajax on Captive Network Assistant on iOS and OSX

浪子不回头ぞ 提交于 2019-12-30 07:12:20

问题


Does ajax work on Captive network Assistant on iOS and OSX? I am using jquery to do the following, but does not work. The responseText variable comes neither as true or false. Works fine on proper Safari browser as well as for android and windows devices.

Also, is there any documentation available for Captive network Assistant? I am unable to find any on google.

function checkEmailHost(hostname) {

    if ($.ajax({
        type : "GET",
        url : "welcome/emailvalidate",
        data : "hostname=" + hostname,
        async : false
    }).responseText == "true") {
        return true;
    } else {
        return false;
    }


}

Thanks in advance.


回答1:


From our experimentation it seems like only synchronous calls are "blocked", hence the async : false in your code.



来源:https://stackoverflow.com/questions/20843992/ajax-on-captive-network-assistant-on-ios-and-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!