Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upnet::ERR_INSECURE_RESPONSE error. #77
Comments
|
By default new OfflinePlugin({
relativePaths: false,
publicPath: '/'
})Hope it helps. Let me know if have any other problems with it. Thanks. |
|
Thanks @NekR It's work perfectly. I turn off relativePaths but forgot to mention relativePath :) |
|
@pyadav yeah, it's a bit weird right, could be better :-) |
|
I saw changelog that it's set to true by default in v3.0.0 |
|
However, there is a design mistake related to combination of Bug with relation of If you are interested, you can try
Hope this helps :-) |
|
Just got this issue on 4.7
|
|
|
|
@NekR I have added the code you recommend, but it still not working. What should I do? |
|
@NekR I'm also having the same problem with v4.8.3. My web app runs inside a folder in production: http://website.tld/appName/... This is my config:
|
|
Your service worker script should have JavaScript mime type and your appcache file should have its own manifest mime type. In your case they both have html's mime type. I van read that in console. |
|
Sorry, I don't get it :-( In the setup, faqs or troubleshooting sections I don't see anything about mime types. Could you explain further what do I need to do? AFAIK, I don't have a service worker script. All I'm doing is loading the NPM package ???? Same thing for the appcache file. |
|
Sorry, but I'm not going to teach web development here. |
|
Right, the issue I'm having with the mime types and the appcache not loading is that all the files ( I've tried using |
|
This is what fixed it for me:
|
|
I fix the issue when I set the public path in webpack.config.output rather than in OfflinePlugin, but don't know why. |
|
@yelynn2015 you need it in webpack config, otherwise webpack itself won't work. offline-plugin options are just override, by default it takes what you specify in webpack config. |
|
Thank you! @NekR |




Everything working great if i navigate from root level but when i refresh a child path then its try to make a request for /nested-route/sw.js which produce DOMException: Failed to register a ServiceWorker: The script has an unsupported MIME type ('text/html') Error.