How To Send Push Notifications With JavaScript

preview_player
Показать описание
Sending push notifications in JavaScript seems like it would be difficult if not impossible, but it is actually built into the browser and quite easy. In this video I show you everything you need to know about sending push notifications with JavaScript and just how easy it is.

🌎 Find Me Here:

⏱️ Timestamps:

00:00 - Introduction
00:45 - Requesting Permission
01:44 - Sending Basic Notifications
02:25 - Advanced Notification Properties
07:15 - Example Usage

#NotificationAPI #WDS #JavaScript
Рекомендации по теме
Комментарии
Автор

This is a great introduction to regular notifications, but these are NOT push notifications, the video title is misleading. In order to make push notifications, you must pair the Notification API with the Push API (see MDN docs) in server workers. You should update the title of the video to reflect that.

danielegvi
Автор

Correction: this is known as a local notification, not a push notification. They are both part of the umbrella term of notifications but have entirely different implementations.

A push notification is triggered with data sent from a remote origin, typically an APN (iOS), GCP (Android) or via the web push API connected to a remote server. The remote data provider pushes the data to the client, hence the term 'push notification'.

A local notification is triggered from within a web page or app, and does not rely on a remote origin to provide data. The local notification can be displayed with data retrieved from a remote source, but this is not the same as a push notification.

ChronSyn
Автор

My take away from this tutorial i just watched because it sounded interesting is: i know it exists, i know it is easy to do, i know where to find a tutorial. Thanks a lot Kyle

chrisodillman
Автор

Bro, You really one of the best people that teaching programming on youtube. i have learnt a lot of things from you and your explanation was amazing

amrmashaal
Автор

Your tutorials are the best for me through the whole youtube. Useful information in every seconds, and nothing else.

sayatraykulov
Автор

This is great. Would be even better if we got a video on the Push API :)

KomentatorBre
Автор

This guy is God sent. The explanation is sooo clean

rolitorape
Автор

Thank you Kyle. I'm from Uzbekistan and Im learning web programming. You really simplify the web!

otabekkadirov
Автор

great video about notifications! but beware! notifications only, not push notifications! for push notifications you must first subscribe to push notifications on a web page / site, and then the server will send those push notifications, no matter if the browser is on that page or that page is closed; of course, after receiving a push notification you will show it to the user like the examples in this video

AlexCernat
Автор

Yet another high value tutorial. Thank you!

vugarbakhshalizade
Автор

Too good and an excellent addition to my code arsenal. Long live mate.

yasirtahirkheli
Автор

Nice tutorial, thanks! Please do a tutorial on PWA & Web push notifications (for when the browser is closed to keep receiving notifications). They are kinda complex, but I think you will be able to explain them very clearly.

giorgosMih
Автор

As mentioned by @chronSyn below this is not a push notification, that requires a backend service to 'push' the notification based on some event to the browser even when you are not viewing the page. Google has a push api but most are paid and a little complex to implement.

jimmymedia
Автор

Very useful video. Glad I'm part of your subscribed viewers Kyle. Keep it up!

randomuser
Автор

Great tutorial! Though the JS notification api isn’t fully supported on phones. It isn’t even possible on IOS as of now and chrome on android needs service workers.

Just additional information :)

MoggersGG
Автор

It's been great to have this video posted recently as I've been thinking about how to do this for my app. Thank you so much

ubeydeozdmr
Автор

I love the way you research something for a video. Now this can't be more explained than you have already done

xdmemeguy
Автор

But it's actually not push notifications, if my app is closed I don't receive anything like we see in the thumbnail

Wawa-nhsq
Автор

I will have to implament that next week at my job. Perfect timing. Thank you so much!

matheusmartino
Автор

such a high value tutorial and info! thanks kyle!

zulhilmiomar
welcome to shbcf.ru