safari检测无痕模式


try {
localStorage.test = 2;// try to use localStorage
} catch (e) {//there was an error so...
alert('You are in Privacy Mode\nPlease deactivate Privacy Mode and then reload the page.');
}

你可能感兴趣的:(Safari)