Persists profileId, purges the service-worker cache and reloads onto that profile.
The id is written to BOTH stores, and they do different jobs:
sessionStorage — consumed by boot-core on the very next load (one-shot),
which is what makes the reload land on the chosen profile even if localStorage
is unavailable;
localStorage — the durable preference, restored on later visits.
Persists
profileId, purges the service-worker cache and reloads onto that profile.The id is written to BOTH stores, and they do different jobs:
sessionStorage— consumed byboot-coreon the very next load (one-shot), which is what makes the reload land on the chosen profile even if localStorage is unavailable;localStorage— the durable preference, restored on later visits.