Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

185
Views
Safari on ios v15.0 and web Worker

I got a web worker work perfectly on all navigator except my favorite one. "Safari". The result is totaly random. Sometime it's work, sometime not, and i really not understand why.

My code is sample, but i probably do something wrong .. Any idea ?

Main.js

function CreateWorker(){
return new Promise((resolve, reject) => {
     const w = new Worker("worker.js");
     w.onmessage = function (args) { alert("work fine");};
     w.onerror = function(e){ alert("error");};
     w.postMessage({ Size : 1280});
});

}
CreateWorker();

Worker.js

onmessage = function (args) {
postMessage({ Msg : "Received"});
}

So if i test it on multiple browser everyting work fine, but safari always give random result. Is it possible it's a cache story, or something i miss somewhere ?

Is it possible the worker is not finish to load the file, and are not ready to received the message ? If yes, is there a way to validate that the worker is ready to received a message ?

Thanks for your help.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!