VOOZH about

URL: https://www.geeksforgeeks.org/html/html-dom-window-sessionstorage-property/

⇱ HTML DOM Window sessionStorage( ) Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML DOM Window sessionStorage( ) Property

Last Updated : 15 Jun, 2023

The Window sessionStorage() property is used for saving key/value pairs in a web browser. It stores the key/value pairs in a browser for only one session and the data expires as soon as a new session is loaded.

Syntax: 

window.sessionStorage

Return Type: it returns Storage object

Below program illustrates the Window sessionStorage() property :

Creating a sessionStorage name/value pair.

Output: 

👁 Image

After clicking the button:

👁 Image

Supported Browsers: The browser supported by Window sessionStorage( ) Property are listed below: 

  • Google Chrome 5
  • Edge 12
  • Internet Explorer 8
  • Firefox 2
  • Opera 10.5
  • Safari 4
Comment
Article Tags: