Safari 浏览器在重定向时崩溃 window.location
Safari browser crashes on redirect window.location
我正在使用此代码打开应用程序,如果它已安装,否则会要求安装。
window.setTimeout(function () {
var end = (new Date()).valueOf();
if (end - start < 1000) {
window.setTimeout(function () {
window.location = pageurl;//will be redirected to webpage crash is happening here
}, 5);
window.location = storeurl;
} else {
window.location = pageurl;
}
}, 5);
window.location = appicationurl;// will defaultly open application
使用window.location.href
window.setTimeout(function () {
window.location.href = "http://sample.com";
}, 5000);
尝试window.open(pageurl);
window.setTimeout(function () {
var end = (new Date()).valueOf();
if (end - start < 1000) {
window.setTimeout(function () {
window.open(pageurl);//will be redirected to webpage crash is happening here
}, 5);
window.location = storeurl;
} else {
window.location = pageurl;
}
}, 5);
window.location = appicationurl;// will defaultly open application
我正在使用此代码打开应用程序,如果它已安装,否则会要求安装。
window.setTimeout(function () {
var end = (new Date()).valueOf();
if (end - start < 1000) {
window.setTimeout(function () {
window.location = pageurl;//will be redirected to webpage crash is happening here
}, 5);
window.location = storeurl;
} else {
window.location = pageurl;
}
}, 5);
window.location = appicationurl;// will defaultly open application
使用window.location.href
window.setTimeout(function () {
window.location.href = "http://sample.com";
}, 5000);
尝试window.open(pageurl);
window.setTimeout(function () {
var end = (new Date()).valueOf();
if (end - start < 1000) {
window.setTimeout(function () {
window.open(pageurl);//will be redirected to webpage crash is happening here
}, 5);
window.location = storeurl;
} else {
window.location = pageurl;
}
}, 5);
window.location = appicationurl;// will defaultly open application