Web Storage Vs Session Storage Vs Local Storage

What is the difference between →

Web Storage Vs Session Storage Vs Local Storage?

In context with JS?

Hi @codeispoetry, the session storage persists data for the current session only, whereas the local storage persists even after browser restarts; both are implementing the Storage interface that is part of the web storage API.

2 Likes

Web storage is where it’s stored on someone elses machine.
Local storage is where it’s stored on your own machine.
Session storage is where it’s stored on your own machine, while the web browser is active.

1 Like

Thanks.

Nice. Thanks.

Local storage(persistent session storage) is more powerful.

So here →

Local storage will be better option.

When I read the article you referenced about web storage I think it describes local storage and session storage. When I search the internet I find Web Storage API - Web APIs | MDN that also imples that web storage is local storage and session storage.

I know in the past I spent a lot of time researching these issues but I do not remember everything I found. So that is why I did quick search now for answers.

1 Like