What is the purpose of the 'localStorage' API in web browsers?
-
A
Stores data on the server for the current user
-
B
Persists key-value data in the browser with no expiration
-
C
Temporarily stores session data cleared when the tab closes
-
D
Caches images and CSS files locally