Binary frames received on a WebSocket are now delivered to the message event as Blob objects by default. This matches the WebSocket specification and standard browser behavior. Previously, binary frames were always delivered as ArrayBuffer. The binaryType property on WebSocket controls the delivery type on a per-WebSocket basis.
This change has been active for Workers with compatibility dates on or after 2026-03-17, via the websocket_standard_binary_type compatibility flag. We should have documented this change when it shipped but didn’t. We’re sorry for the trouble that caused. If your Worker handles binary WebSocket messages and assumes event.data is an ArrayBuffer, the frames will arrive as Blob instead, and a naive instanceof ArrayBuffer check will silently drop every frame.
To opt back into ArrayBuffer delivery, assign binaryType before calling accept(). This works regardless of the compatibility flag:
const resp = await fetch("https://example.com", { headers: { Upgrade: "websocket" },});const ws = resp.webSocket;
// Opt back into ArrayBuffer delivery for this WebSocket.ws.binaryType = "arraybuffer";ws.accept();
ws.addEventListener("message", (event) => { if (typeof event.data === "string") { // Text frame. } else { // event.data is an ArrayBuffer because we set binaryType above. }});If you are not ready to migrate and want to keep ArrayBuffer as the default for all WebSockets in your Worker, add the no_websocket_standard_binary_type flag to your Wrangler configuration file.
This change has no effect on the Durable Object hibernatable WebSocket webSocketMessage handler, which continues to receive binary data as ArrayBuffer.
For more information, refer to WebSockets binary messages.
Source: Cloudflare
Latest Posts
- (Updated) Introducing Surveys Agent and Copilot Chat in Microsoft Forms [MC1229954]
![(Updated) Introducing Surveys Agent and Copilot Chat in Microsoft Forms [MC1229954] 2 pexels edward jenner 4253062](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- (Updated) Microsoft Teams: New chat sections for muted and meeting chats [MC1269864]
![(Updated) Microsoft Teams: New chat sections for muted and meeting chats [MC1269864] 3 pexels pixabay 208421](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Microsoft Entra ID single sign-on for the Starburst connector in Power BI (Preview)

- Dataverse – Chat and reason over Dataverse business data in Microsoft 365 Copilot (preview) [MC1395644]
![Dataverse - Chat and reason over Dataverse business data in Microsoft 365 Copilot (preview) [MC1395644] 5 socks 1322489 1920](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)

![(Updated) Introducing Surveys Agent and Copilot Chat in Microsoft Forms [MC1229954] 2 pexels edward jenner 4253062](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-edward-jenner-4253062-150x150.webp)
![(Updated) Microsoft Teams: New chat sections for muted and meeting chats [MC1269864] 3 pexels pixabay 208421](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-pixabay-208421-150x150.webp)

![Dataverse - Chat and reason over Dataverse business data in Microsoft 365 Copilot (preview) [MC1395644] 5 socks 1322489 1920](https://mwpro.co.uk/wp-content/uploads/2025/06/socks-1322489_1920-150x150.webp)
