just use a service worker to share state, you would be much better off doing this anyways. saves a ton and is performant.
https://github.com/w3c/ServiceWorker/issues/980#issuecomment...
Also unfortunately Chrome doesn't keep SharedWorker alive after a navigation (Firefox and Safari do):
https://issues.chromium.org/issues/40284712
Hopefully Chrome will fix this eventually, it really makes it hard to build performant MPAs.