- From: Andrew Sutherland <notifications@github.com>
- Date: Wed, 24 Feb 2021 08:40:25 -0800
- To: whatwg/storage <storage@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/storage/issues/119/785208076@github.com>
Thank you for the clarification and excellent example and summary! Also, thank you very much for creating and linking the amazing document in which you've gathered use-cases and analyzed the impacts of the different solutions on the use-cases! I think you make a great case for "clone & swap". In particular, I think it: - Maximizes web-compat by being deterministic instead of allowing races that will fundamentally depend on browser implementation details. - As a direct consequence, this should also simplify future browser implementation. That said, the fact that LocalStorage potentially involves races means that browsers might have to deal with implementing "shared" anyways. - Maximizes the ability of web developers to reason about what's going on by being deterministic and not involving races. - As per the above, LocalStorage will still be a problem here for developers (because races will continue be inherent), but their experience with StorageEvents across LocalStorage and SessionStorage should help their logic act consistently in both cases. - I could see developers expecting that more of a "merge" would happen rather than than the swap/replacement, but it seems appropriate for the window with the user interaction to "win"; SessionStorage should be reflecting user actions and intent and any mutations the pre-rendered window would perform would by definition not be as a result of direct user action (in the page). - Avoids the potential need for synchronous IPC in the implementation. - Could be relaxed to a "shared" model in the future if desired without regressing sites that properly handle storage events. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/storage/issues/119#issuecomment-785208076
Received on Wednesday, 24 February 2021 16:40:38 UTC