PrepAway - Latest Free Exam Questions & Answers

You are developing an e-commerce website. Users place products into a shopping cart.

You are developing an e-commerce website. Users place products into a shopping cart.

You need to ensure that the shopping cart data is available between browser sessions.

Which object should you use to store the shopping cart data?

A. clientStorage

B. localStorage

C. applicationStorage

D. sessionStorage

Explanation:

With local storage, web applications can store data locally within the users browser.

HTML local storage, better than cookies.

Before HTML5, application data had to be stored in cookies, included in every server request. Local storage is more secure, and large amounts of datacan be stored locally, without affecting website performance.

Reference: HTML5 Local Storage


Leave a Reply