 So my friend's son does this really cute thing where they install games on their phone And then for weeks after they keep getting notifications saying that their village is under attack Can you do that on the web? Now you can now you can how? Basically, what happens is you register your service worker You then ask it to subscribe these to push message shows a little dialogue saying do you want to allow this to happen? Yes or no so hopefully then the kids won't actually enable this at that point But if they do then that point you'll get a special token this for that user send that to your server Keep it when you want to trigger a push notification You can then use that endpoint send it a specific request and that will basically wake up the service worker on that user's device And go cool. There's a push message. What do you want to do about it? At that point you can just show a notification you can go back to the server and say hey What was this for? You show your notification and then you can respond to click events nice So that's literally like the whole end to end flow start to finish so can push notifications Can you with the push API? Can they show me like images? Can I include content in there? What can I do title? Title text you can do body text you can have an image to the side of the notification and You can also do buttons now as well So you can actually add like two buttons that you can so I can show an image saying that my you know Showing that my village is on fire But also a button to like extinguish the fire or watch it burn watch it burn It's also interesting because now we're looking at doing native notifications for Mac which is really nice because it means that we get rid of our own notification like Center thing we're now going back into like native notifications and their trades and whatever else goes with it Push notifications are not a chrome only thing right no So they're in Chrome and Firefox at the moment I think other browser vendors once they start doing service worker. They can start looking at it as well sweet There is some bad stuff with Chrome and says we have to we use GCM. So we have some proprietary bits What's this GCM GCM good point Google cloud messaging? Okay, I've been drinking the Kool-Aid for too long So there's some proprietary bits you have to do for that But again, there's new specs that are coming up that will wipe all of that out So then because the moment you have to go into Google developer console you have to register for an API key there All of that's gonna go away So you just have one API one set way of doing this that all the browser vendors can then take and use It's gonna be so much better if I'm correct We have a code lab on push notifications as well. Yes, people can check out Which is well worth doing because that one is regularly kept up to date I think my old blog post at this point has probably seen better days So basically you're saying don't visit your blog under any circumstances. Let's just blanket rule for all of my content But yes, that's what I'm saying But yeah, there is a blog post and it'll step you through all the guides and it also goes through GCM and how to set all that stuff up So, yeah, go check that out. Oh and If someone wants to like Simulate push notifications dev tools lets you do this. I think does it. Yes, it does Mmm. Oh, is that the Bell icon as the Bell icon? Yes, and you can do that from service worker in tournaments. Cool