DOMException: Failed to register a ServiceWorker for scope (‘THE PATH’) with script (‘THE PATH /provider’): The script has an unsupported MIME type (‘text/html’).
Other Information
the cookies maybe are not being sent by the browser
navigator.serviceWorker.register without option work how expected
this doesn’t look like a URL
which should lead to some file
especially when it doesn’t have an extension
The browser only sees the word “provider” (does not look further)
and such a thing does not exist and actually sees a 404 error page (MIME type (‘text/html’))
and I don’t know if it can be a .php file at all
or it must be .js
in any case the script address should point to an existing file
and be called in code like this “provider.php” or “provider.js”
not
navigator.serviceWorker.register('provider space space php'
i can only post two urls so i not use the url so provider is provider.php and all links in my code are functioning, in localhost i can use register with options with type =’ module’ set, so the problem is the host, especifically the policy of not permitting get content withou crendentials or a browser with javascript, but i not sure if register are sending the cookies or not(im think not), or if the register not have a js scope for pass the free server policy
I’m fairly sure that Progressive Web Apps don’t persist cookies, and the Service Worker API calls definitely don’t execute the Javascript code to generate a new one.
hahaha i was seeing the diference in request between the two in localhost a here is the problem the browser really not send cookies with type: ‘module’ set, maybe a bug or other explanation
I’m not sure that that module type actually changes in terms of requests, but in the HTTP data you shared, I do see that the HTTP_COOKIE parameter is present when not using type: module but for modules it’s not present.
Given that our security system checks access with cookies, if the request doesn’t send cookies, then it will be intercepted.