On iOS 11 Safari (and probably the new version of desktop Safari too? but didn't check that one), that trick of seeing if
window.localStorage.setItem('test', 1);
throws an error no longer works, because it no longer throws an error, and it also properly sets the localStorage item. Has anyone figured out any other way to check for private browsing mode in the new versions of Safari?
I also posted here:
https://stackoverflow.com/questions/45721156/detect-private-browsing-in-ios-11-mobile-safari
and