HTML APIs
1. Geolocation API
Get the user's location:
navigator.geolocation.getCurrentPosition(function(position) { console.log(position.coords.latitude, position.coords.longitude); });
2. Web Storage API
Store data locally:
localStorage.setItem("username", "JohnDoe"); alert(localStorage.getItem("username"));