Which storage is cleared when the browser tab is closed?

Learn web design with our comprehensive test guide. Improve your skills with flashcards and multiple choice questions. Each question includes hints and explanations. Get ready to ace your exam!

Multiple Choice

Which storage is cleared when the browser tab is closed?

Explanation:
Data cleared when a browser tab is closed is sessionStorage. This storage is tied to a single tab (a browsing context) and to the origin, so it keeps data while you reload or navigate within that tab, but it’s wiped when you close the tab. In contrast, localStorage persists across tab and browser sessions until you explicitly clear it. The HTML <bdo> element is only for bidirectional text formatting, not storage, and the contenteditable attribute just makes an element editable in place, not a storage mechanism.

Data cleared when a browser tab is closed is sessionStorage. This storage is tied to a single tab (a browsing context) and to the origin, so it keeps data while you reload or navigate within that tab, but it’s wiped when you close the tab. In contrast, localStorage persists across tab and browser sessions until you explicitly clear it. The HTML element is only for bidirectional text formatting, not storage, and the contenteditable attribute just makes an element editable in place, not a storage mechanism.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy