I see different behaviors of the HTML5 sessionStorage when following Weblinks. Sometimes the sessionStorage of the first page is being copied to the TargetPage, sometimes I get an empty sessionStorage on the TargetPage.
Can anyone explain me, why this is the case?
Given the following link:
<a href="TargetPage.html" target="_blank">link</a>
When I open the link with a right-click -> "open link in new Tab", the sessionStorage is empty on the TargetPage. (Expected) But when I open the link with a normal left-click, the sessionStorage gets copied over to the TargetPage. (Unexpected)
Note: I've seen this behavior in Chrome and Firefox. Internet Explorer 9 provides an empty sessionStorage in both cases. This is my expected behavior.
I've created a jsFiddle to demonstrate the behavior: http://jsfiddle.net/P9nUv/3/
Can anyone think of a cross-browser solution to ensure an empty sessionStorage for new Browser Tabs/Windows, no matter how they've been opened?
Any help is appreciated!