HTML5 Local Storage - MCQs

HTML5 Local Storage - MCQs


1) Which is designed for storage that spans multiple windows, and lasts beyond the current session.

A) Session Stotage
B) Local Storage
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: B) Local Storage




2) To clear a local storage all setting you would need to call.

A) localStorage.remove('key')
B) localStorage.clear()
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: B) localStorage.clear()




3) The Session Storage Data would be deleted by the browsers immediately after the session gets terminated.

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




4) Which is designed for scenarios where the user is carrying out a single transaction, but could be carrying out multiple transactions in different windows at the same time.

A) Local Storage
B) Session Storage
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: B) Session Storage




5) HTML5 introduces two mechanisms, similar to HTTP session cookies, for storing structured data on the client side and to overcome which of these drawbacks.

A) Cookies are included with every HTTP request, thereby slowing down your web application by transmitting the same data.
B) Cookies are included with every HTTP request, thereby sending data unencrypted over the internet.
C) Cookies are limited to about 4 KB of data . Not enough to store required data.
D) All the mentioned above
View Answer / Hide Answer

ANSWER: D) All the mentioned above



Post your comment