0Pricing
JavaScript Academy · Lesson

Transferable Objects

Move data efficiently without copying.

The Cost of Cloning

Structured cloning copies data byte by byte. For large buffers (images, audio, big arrays) this copy is slow and doubles memory use. Transferable objects solve this by moving ownership instead of copying.

What Can Be Transferred

Only certain object types are transferable, most importantly ArrayBuffer. Others include MessagePort, ImageBitmap, and OffscreenCanvas.

  • ArrayBuffer — raw binary memory
  • MessagePort — a channel endpoint
  • ImageBitmap — decoded image data

All lessons in this course

  1. Creating a Web Worker
  2. Messaging with postMessage
  3. Transferable Objects
  4. Use Cases and Limitations
← Back to JavaScript Academy