---
title: "Discussion on \"The only snippet you will need to deal with push notifications in a service worker\" | Hashnode"
description: "Discussion on \"The only snippet you will need to deal with push notifications in a service worker\". I'm working on a PWA at the moment. What a great time it is to be able to develop near native looking mobile applications without having to deal with flutter, native code, etc.\nOne part in particular is great: push notifications. Now that Safari 16 h..."
url: "https://hashnode.com/posts/the-only-snippet-you-will-need-to-deal-with-push-notifications-in-a-service-worker/6359206e282c738de3b46650"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The only snippet you will need to deal with push notifications in a service worker](https://blog.lekoala.be/the-only-snippet-you-will-need-to-deal-with-push-notifications-in-a-service-worker?utm_source=hashnode&utm_medium=feed)

I'm working on a PWA at the moment. What a great time it is to be able to develop near native looking mobile applications without having to deal with flutter, native code, etc. One part in particular is great: push notifications. Now that Safari 16 h...

Oct 26, 2022 · 2 min read · blog.lekoala.be  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#pwa](https://hashnode.com/tag/pwa)
-   [#push-notifications](https://hashnode.com/tag/push-notifications)

## Written by

[Thomas Portelange](https://hashnode.com/@lekoala)

@lekoala · Belgium

  
[View profile](https://hashnode.com/@lekoala)

A PHP/JS Web Developer based in Belgium

A Web Developer based in Belgium, specialized in PHP &amp; JS development

## Responses 1

Markdown supported · ⌘↵ to post

[Anton Andreasson](https://hashnode.com/@naton)

[Apr 4, 2023](https://hashnode.com/posts/the-only-snippet-you-will-need-to-deal-with-push-notifications-in-a-service-worker/6359206e282c738de3b46650/comment/642bef40ae2a7e07433942c8)

Great post! But how would you integrate this into your Workbox setup? I'm having troubles since I'm using its auto-generated sw.js file based on my workbox config, are you adding the push code there too or somewhere else..?
