sessionStoragesetItembrukerOla
sessionStorage is a web storage object defined by the HTML5 Web Storage API that allows web applications to store key/value pairs in a browser. The data stored in sessionStorage is tied to a specific browsing session, meaning it survives page reloads or navigation within the same tab but is cleared when the tab is closed or the browser is restarted. This makes sessionStorage suitable for storing temporary state such as user progress in a multi‑step form or client‑side cache that should not persist beyond the current user session.
The storage capacity of sessionStorage is similar to that of localStorage, typically around 5 to 10 megabytes
Unlike localStorage, which retains data indefinitely until explicitly cleared, sessionStorage is cleared automatically when the browsing