Thanks for watching! 👉 Source code: openjavascript.info/2023/01/20/show-desktop-notifications-with-javascript-in-the-browser/
@constantine9074 Жыл бұрын
this is one of the most valuable channels one youtube in field of we dev... and its not only for beginners ....
@zeljkostevanovic60512 жыл бұрын
Greetings from Serbia! Wish you all the best.
@OpenJavaScript2 жыл бұрын
Thank you!
@vellenger2 жыл бұрын
Muy Bueno, se Agradece que compartas el tutorial.
@OpenJavaScript2 жыл бұрын
Gracias, me gusta compartirlo :)
@sougataghar11792 жыл бұрын
Thanks :)
@OpenJavaScript2 жыл бұрын
No worries, you're welcome :)
@MuttaqinMashrafi9 ай бұрын
🎉 you are doing great . But i wanna know will it be working when user is not in the browser ? I mean if i am using a database and when something changes in the database i want to send a notification. So will it be fine to use it with that?
@haiderjaafer81642 жыл бұрын
Great tutorial keep going forward
@OpenJavaScript2 жыл бұрын
Thanks!
@samworldpk3 ай бұрын
how can I use it as a heartbeat of some stock API in browser. I donot want to bind it any web page. something like chrome extension with background script
@samworldpk3 ай бұрын
I tried the chrome notifications but it is not visible some how with chrome alarms
@cloudsystem3740 Жыл бұрын
thank you very much but how to save the notifications so the user not getting the same notification every refresh ? :)
@OpenJavaScript Жыл бұрын
Good question! For this, you need a solution that will pass data across pages. My go-to solution in this case would be to use localStorage. So, after a notification has run, store a value in LS. Also, before showing a notification, check the value of localStorage. For example: // Check to see if const status = localStorage.getItem('notification-status'); if (status !== "shown") { // If no record of notification running previously is present in LS... // ...run code for displaying notification... // ...and set record in LS so it doesn't run again next time: localStorage.setItem('notification-status', "shown"); }