Beginner
Web & Software Development
Q36 / 100
What is localStorage vs sessionStorage?
Correct! Well done.
Incorrect.
The correct answer is B) Both store key-value pairs in the browser: localStorage persists until explicitly cleared; sessionStorage is cleared when the browser tab closes
B
Correct Answer
Both store key-value pairs in the browser: localStorage persists until explicitly cleared; sessionStorage is cleared when the browser tab closes
Explanation
Web Storage API: localStorage (5-10MB, persistent, shared across tabs from same origin). sessionStorage (5MB, tab-scoped, cleared on tab close). Neither sends data to server (unlike cookies).
Progress
36/100