Welcome Guest! (App Version 3.1)

websitnero logo name

Session Storage

Using Session Storage in HTML5

Session storage is the second part of Web Storage. Just like local storage, the data can also be saved in the session storage. It just works the same. The only difference is that the values in session storage are removed when session ends or if tab to a website is closed.

Example

<button onclick="alpha()">Click Me</button>

<script>

function alpha(){
  sessionStorage.name = "Peter Martin"; 
}

</script>

Example

<button onclick="alpha()">Click Me</button>
<button onclick="beta()">Click Me too</button>

<script>

function alpha(){
  sessionStorage.name = "Peter Martin"; 
}
function beta(){
  alert(sessionStorage.name);
}

</script>
WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.