Geofencing for the Web

navigator.serviceWorker.register(‘serviceworker.js’).then( function(serviceWorkerRegistration) { serviceWorkerRegistration.geofencing.add( new CircularGeofenceRegion({ name: “myfence”, latitude: 37.421999, longitude: -122.084015, radius: 1000 }), {includePosition: true}).then( function(geofence) { console.log(; // If more than just a name needs to be stored with a geofence, now // would be the time to store this in some storage. }, function(error) { // During development it often helps […]

The ServiceWorker is coming, look busy!

Look at the apps on your homescreen. Why are they native? Why aren’t they just on the web? Its usually some combination of push messaging, background sync, offline & performance. When native has something the web doesn’t, we should consider it a bug. Let’s have a look at the fixes, focusing on the ServiceWorker. By […]