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

249
Views
Why am I getting a CORS error from just a simple Settimeout function in javascript?

Everything is working fine in Chrome the problem is with FireFox and Microsoft Edge. With these two browsers I keep on getting CORS errors. I am making no API calls in this website. All this function that is causing this error is doing is resetting the opacity of some text I hid back to 1.

This is the function that is causing the error:

setTimeout(() => {
  opacityP.style.opacity = 1;
  opacityB.style.opacity = 1;
}, 3000);

This are the error message from FireFox and Microsoft Edge: Firefox Cors Error

Microsoft Edge Cors Error

Thanks in advance for your help.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I think it's not possible to access local script files at the browser level. You can run the code through a local server like localhost:3000 or so. Xampp or Wamp would work for you. If you're using VS Code, you can use their extension. https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer

Hope this helps you!

about 4 years ago · Juan Pablo Isaza Report
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!