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

150
Views
How do I set up a ServiceWorker on amazon S3?

I am trying to set up the service worker for a SPA I am making. Its hosted on AWS with S3.

Despite the file being in the correct place I still get the following errors

/service-worker.js:1 The script has an unsupported MIME type ('text/js'). https://djwdy6bk7t99o.cloudfront.net/service-worker.js

Failed to load resource: net::ERR_INSECURE_RESPONSE

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The service worker specification requires that the response for the service worker JavaScript file used in the registration be served with a "JavaScript MIME type" (e.g., Content-Type: application/javascript) header.

That's what I'd expect the default to be for files served by S3 with a .js extension, but perhaps you've previously overridden the default settings? This answer has some details about changing that setting back.

about 4 years ago · Santiago Trujillo 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!