Closed fresh-avocado closed 6 months ago
@fresh-avocado Thanks for reaching out.
- What should happen to OneSignalSDKUpdaterWorker.js?
This file hasn't been used a while (since version 151510, Nov 22, 2021). However since you may have end-user who haven't visited your site since then to be extra safe I would recommend updating the contains of this file to importScripts("https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.sw.js");
as well.
- After I make the necessary updates according to the migration guide, will the push notifications still work for my previous subscribers that used the previous SDK version?
yes, pushes will continue to be received and display for all existing subscribers. Even if they don't open your site again after updating.
- Are there any other things that I need to do in order to update the SDK version, but still make it work for old users?
No other changes are needed.
@jkasten2 thank you so much!
How can we help?
A few years ago I configured One Signal in a website. I added the following script tag on all pages:
and I also self-hosted
OneSignalSDKWorker.js
andOneSignalSDKUpdaterWorker.js
. Both have the same file contents:According to this migration guide I need to update the script tag to:
the contents of
OneSignalSDKWorker.js
to:and rest of the updates:
window.OneSignalDeferred = window.OneSignalDeferred || []
andOneSignalDeferred.push((OneSignal) => ...)
.Thus, I have the following questions:
OneSignalSDKUpdaterWorker.js
?Thank you in advance for your help! 😁