服务工作者错误。不在live(https)服务器上工作 [英] Service Worker error. Not working on live(https) server

查看:94
本文介绍了服务工作者错误。不在live(https)服务器上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在localhost上一切正常,但是当我将同一个文件上传到实时服务器时,我得到了下面提到的错误。

Every thing is working fine at localhost but when i upload same file to live server i got below mentioned error.

Service Worker error : DOMException: Failed to register a ServiceWorker: The script has an unsupported MIME type ('text/html').

如果有人能指出我正确的方向,我会非常感激!
谢谢

If anyone can point me in the right direction I'd greatly appreciate it! Thank you

推荐答案

服务工作者脚本提供ServiceWorker / spec / service_worker / index.html #update-algorithmrel =nofollow>,即 text / javascript application / javascript application / x-javascript

这篇关于服务工作者错误。不在live(https)服务器上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆