0
I am making a test system with an API and I am using pure javascript for integration via AJAX. I am storing the data in local and sessionStorage to transit between pages. My problem is the following:
I store data from a category in sessionStorage and when I do another code to store data from another object in sessionStorage, it does not create the new session. Is it so or has a way to create two sessions?
I’d like to see the methods you’re using to record the session.
– RpgBoss
window.sessionStorage.setItem('category', xhr.responseText);
– Francis Vagner da Luz
window.sessionStorage.setItem('categoriaA',"conteudo A");
window.sessionStorage.setItem('categoriaB',"conteudo B");
console.log('window.sessionStorage');

Retornou os dois normalmente:
window.sessionStorage.length; //2
– RpgBoss