Tuesday 18 April 2017

HTML5 interview questions Part -3

1. Ques: What is HTML Local Storage ?
Answer:
With local storage, web applications can store data locally within the user's browser.
Before HTML5, application data had to be stored in cookies, included in every server request. HTML5 Local storage is more secure, and large amounts of data can be stored locally, without affecting website performance.
Unlike cookies, the storage limit is far larger (at least 5MB) and information is never transferred to the server.
Local storage is per origin (per domain and protocol). All pages, from one origin, can store and access the same data.


2. Ques: What is the Geolocation API and why would you use it?
Answer:
HTML Geolocation API is used to get the geographical position of a user.Since this can compromise privacy, the position is not available unless the user approves it.

The HTML5 Geolocation API allows users to share their location with a website. This is a useful feature that asks a user permission to share their latitude and longitude with the app to receive the benefits of location-aware features, such as the ability to present the landing page of the business closest to the user’s location.

No comments:

Post a Comment

Thank you for comment