News for hackers. Stuff that matters.
Re:Apple introduces macOS Mojave by madeofpalk on Monday June 04, 2018 @03:51PM (#17231595)
Any site that is broken by Private Browsing causing storage quota exceptions in localStorage is going to be broken by quota exceptions under "normal" operation.

It's in the spec, maybe developers should make their websites a bit more resilient to the very real errors that can happen? Did they just forget about error handling?

Re:Apple introduces macOS Mojave by rasz on Monday June 04, 2018 @04:04PM (#17231781)
spec? localstorage errors are not standardized, every browser gives quota exceeded error different name and number, you have to use something like

'' e.name.toLowerCase().includes("quota")

Re:Apple introduces macOS Mojave by madeofpalk on Monday June 04, 2018 @04:52PM (#17232326)
But localStorage.setItem() throwing an error definitely is in the spec, so if someone isn't handling Safari's localStorage behaviour in Private Browsing Mode (that is, throwing exceptions) then they aren't handling the parts of the spec.
Re:Apple introduces macOS Mojave by strictnein on Monday June 04, 2018 @07:56PM (#17233771)
The web isn't built on specs, it's built on conventions. Safari breaks the convention.
Re:Apple introduces macOS Mojave by madeofpalk on Monday June 04, 2018 @08:31PM (#17233972)
the convention is that localStorage throws exceptions. it does in every browser. if a site breaks because it doesn't do error handling, then that's the site's problem.
Re:Apple introduces macOS Mojave by xmodem on Tuesday June 05, 2018 @05:50AM (#17236205)
You and many of the commenters miss an important point: Any apparent behaviour difference between private and non-private mode should be considered a bug, because sites can and do abuse it to detect private mode.
Re:Apple introduces macOS Mojave by madeofpalk on Tuesday June 05, 2018 @06:05AM (#17236271)
I disagree. You might be able to use it to _guess_ but all browsers can throw a quota exceeded exception under normal behaviour. I see this every now and then on mobile devices where the phone is so full the browser refuses to store more localStorage items.
Re:Apple introduces macOS Mojave by xmodem on Tuesday June 05, 2018 @06:57AM (#17236512)
This is exactly what I want to prevent though - I want to prevent dodgy sites from using the quota exceeded exceptions from localStorage to (100% accurately in my experience) guess that I'm browsing in private mode.