Get to know MDN better
Since January 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is only available in Service Workers.
The bytes() method of the PushMessageData interface extracts push message data as a Uint8Array object.
None.
A Uint8Array.
The returned Uint8Array is backed by an ArrayBuffer of bytes. Exceptions thrown during creation of this backing buffer are re-thrown.
See TypedArray.
| Push API # dom-pushmessagedata-bytes |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Nov 7, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.