PushManager.register() was a legacy instance method that asked the system for a new push endpoint URL(MDN). On success, req.result was a string endpoint — not a full PushSubscription.
Pass the required arguments shown below. Check return values and browser support before you rely on the result.
Syntax
Call pushManager.register. Start with this line.
JavaScript
pushManager.register()
Call
What it does
pushManager.register()
Primary signature.
pushManager.register(...)
Call with the arguments your case needs.
Built into the browser. Call register(...) on a PushManager — no import required.
Wait for the worker.serviceWorker.ready gives the active registration.
Reuse if present.getSubscription() avoids creating duplicates.
Subscribe when null. Pass userVisibleOnly and your VAPID key.
Sync the full object. Modern servers need endpoint and encryption keys.
Compatibility
Browser Support
PushManager.register() is Deprecated and Non-standard on MDN. It is missing or removed in modern browsers. Prefer subscribe() (Baseline Widely available).
✓ Deprecated · Non-standard
PushManager.register()
Legacy push endpoint registration — avoid in new code. Use subscribe() instead.
LegacyDeprecated API
Google ChromeNot supported — use subscribe()
Not supported
Mozilla FirefoxLegacy only — use subscribe()
Legacy only
Apple SafariNever supported — use subscribe()
Not supported
Microsoft EdgeFollow Chromium — use subscribe()
Not supported
OperaFollow Chromium
Not supported
Internet ExplorerNo Push API
Not supported
register()Limited
Bottom line: Feature-detect before calling. Build new push features with subscribe() and getSubscription() after serviceWorker.ready.
Frequently Asked Questions
It asked the system for a new push notification endpoint. On success, the DOMRequest result was a string URL. MDN superseded it with subscribe(), which returns a full PushSubscription.
Yes. MDN marks it Deprecated and Non-standard. It is not Experimental. Prefer PushManager.subscribe() in new code.
A DOMRequest object (legacy Mozilla pattern), not a Promise. On success, req.result is the endpoint URL string.
Use PushManager.subscribe() after navigator.serviceWorker.ready. It returns a Promise that resolves to a PushSubscription with endpoint and encryption keys.
No. MDN documents register() with no parameters.
MDN says if you no longer need the URL, call PushManager.unregister(). Modern code uses PushSubscription.unsubscribe().