How to prevent sessionStorage being inherited when using target=“_blank”/window.open() to open a new window/tab?
问题 On a tab with url http://foo.com/ I set a sessionStorage item thus- sessionStorage.bar="hello"; I then open a new window on any path on the same domain - window.open("http://foo.com/any/path"); Then on the new window I find that - sessionStorage.bar === "hello" Is true. The exact same thing happens if I use a link with target="_blank" attribute to open the new window. The exact same thing also happens when a new tab is opened, and not a new window. Another thing to note is that this is only