Home » Microsoft » 70-480 v.2 » Which object should you use to store the shopping cart data?
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
Correct Answer: B
Explanation/Reference:
With local storage, web applications can store data locally within the user’s 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 data can be stored locally, without affecting website performance.
Reference: HTML5 Local Storage