title: how to pass large data to web workers
body: <p>I am working on web workers and I am passing large amount of data to web worker, which takes a lot of time. I want to know the efficient way to send the data. </p>
  
  <p>I have tried the following code:</p>
  
  <pre><code>var worker = new Worker('js2.js');
  worker.postMessage( buffer,[ buffer]);
  worker.postMessage(obj,[obj.mat2]);
  if (buffer.byteLength) {
    alert('Transferables are not supported in your browser!');
  }
  </code></pre>