Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

171
Visualizações
Is there any alternatives for using Cookies or Session storage when creating a shopping cart in JavaScript?

To make an e-commerce site accessible even to those who have blocked cookies from their browser, is there any alternative way when creating a classic shopping cart to store cart data elsewhere while user is shopping?

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

On modern browsers, localstorage can be used. For details, please refer to: https://javascript.info/localstorage

about 4 years ago · Juan Pablo Isaza Relatório

0

Modern browsers provide WebStorage API for store data locally on the client system with capacity at least 5MB, and data never transferred to the server unlike cookies.

WebStorage API provides two object for storing data on the client:

  • window.localStorage - stores data with no expiration date
  • window.sessionStorage - stores data for one session (data is lost when the browser tab is closed)

https://www.w3schools.com/html/html5_webstorage.asp

https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API

Modern browsers also provide IndexedDB API to storage of significant amounts of structured data on client system. This API uses indexes to enable high-performance searches of this data. While Web Storage is useful for storing smaller amounts of data, it is less useful for storing larger amounts of structured data.

https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API

WebStorage API store and retrieve data as synchronize which means make main threat of web page blocked until data stored or retrieved. But operations performed using IndexedDB are done asynchronously, so as not to block applications.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda