What is session storage?



What is session storage?..

Answer / Vikas Mohan

Session Storage in HTML5 is a type of web storage that stores data across pages but is limited to the same origin as the document where it was set. Session Storage is useful for storing data during user sessions, and once the user closes the browser, the data is deleted. Here's an example:

```javascript
sessionStorage.setItem('key', 'value');
sessionStorage.getItem('key'); // Retrieves the value associated with the key
sessionStorage.removeItem('key'); // Removes the value associated with the key
```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More HTML DHTML Interview Questions

What is ul in html?

1 Answers  


What is the function of the br tag?

1 Answers  


How to redirect using HTML?

1 Answers  


How do I make my website responsive?

1 Answers  


What is meta html?

1 Answers  


What is the difference between frame and div in html?

1 Answers  


Explain five new input types provided by HTML5 for forms?

1 Answers  


What is the difference between <header> and <footer> tag?

1 Answers  


What is getelementbyid innerhtml?

1 Answers  


What is inner text?

1 Answers  


What is a body tag?

1 Answers  


Is the br tag deprecated?

1 Answers  


Categories