Created
September 13, 2012 11:48
-
-
Save pawel-dubiel/3713813 to your computer and use it in GitHub Desktop.
#Iphone check the Private browsing is enabled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
localStorage.setItem('test', 'test'); | |
} catch (err) { | |
if ((err.name).toUpperCase() == 'QUOTA_EXCEEDED_ERR') { | |
document.write('<div style="padding:5%;margin:5%;background:#777;color:white;height:90%">We don\'t seem to be able to store the information needed for this app to work on your phone.<br /><br /> It\'s probably because you have enabled private browsing mode. If you\'d like to disable private browsing go to settings section on your phone.</div>'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment