-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
protocol relative tile urls break file:// URLs #1729
Comments
+1 for changing the developer guide. |
Note that |
#1741 might be a good reason to reconsider protocol relative urls in some cases. |
There's an easy work-around for #1741 - see my comment in the issue. |
Should the developer's guide could be updated with this advice for those wishing or needing to use the file:// protocol then? |
It might make more sense to document it in the sources that use protocol-relative URLs. |
How about in both places? Individual sources that use protocol-less URLs by default can mention it and what to use if the page is loaded from
Question: would setting the protocol in the source avoid CORS issues, or is this something that would still be a problem? |
OK, makes sense. As I understand it, CORS simply doesn't work over the |
Okay, put another way, what won't work because of CORS issues when using the |
My understanding is that resources loaded from |
I overcame that issue by creating the following module - https://www.npmjs.com/package/cordova-network-interceptor which intercepts and fixes bad network requests caused by relative protocol used in scripts. Hope that helps! |
In the developer's guide, we suggest to users that they can run the examples like this:
The recent change to protocol relative urls in #1694, #1692, and #47 removes the ability to load HTML files with the file:// protocol. I suppose the easiest fix is to change that in the developer's guide, but I am not sure this is the best approach.
The text was updated successfully, but these errors were encountered: