lundi 6 juillet 2015

The latest Chrome Beta adds support for push notifications from websites



Phandroid Chrome


Google loves the web. They want everyone to do everything inside of the Chrome browser. We’ve seen them add more and more features to Chrome that allow websites to act like apps. Chrome in Android 5.0 treats tabs like apps when you press the “Recents” button. Websites can even change the color of the status bar. Google’s next step is to allow websites to send notifications through Chrome.


In the latest build of Chrome Beta (42) they’ve including two new APIs that allow sites to push native notifications to users even if the website is not currently opened. Here’s the tech-speak behind how it works:


After the user has granted permission, a developer can use the new Push API to remotely wake up their service worker using Google Cloud Messaging. Once awake, the service worker may run JavaScript for a short period but in this release it is required at minimum to show a user-visible notification. Each notification includes a ‘Site Settings’ button, allowing users to easily disable notifications for a site.


Screen Shot 2015-03-04 at 2.35.05 PM copy


This is a really big deal. As mobile sites and browsers get better there is less reason to download apps. Some mobile sites are already better than their app counterparts (*ahem* Facebook), but we stick with apps because they offer a native experience. If websites start adopting these new APIs it could change the way we use apps.


Another notable feature in Chrome Beta 42 is promoted home screen shortcuts. If Chrome detects you visit the same site a lot you will see a pop-up suggesting you add a shortcut to the site to your home screen. Once again, this is a direct shot at apps. Google will be actively urging users to treat websites like apps by placing them on the home screen. More info about Chrome Beta 42 can be found on the Chromium Blog.





Aucun commentaire:

Enregistrer un commentaire