chrisben / imgcache.js

JS library based on the File API to cache images for offline recovery (target: cordova/phonegap & chrome)
Other
826 stars 216 forks source link

fix: Normalize URLs on Ionic WKWebViews #228

Closed Maistho closed 4 years ago

Maistho commented 6 years ago

Normalizes URLs on ionics wkwebview.

Recommended by the Ionic devs as a reasonable solution. https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/76#issuecomment-380234494

fixes #223

Let me know if there's anything else I've missed!

Maistho commented 6 years ago

I rebased it and updated to support v2 of ionics webviews. They changed the naming of the function around, and it is now required for android as well.

https://github.com/ionic-team/cordova-plugin-ionic-webview#migrating-to-2x

Maistho commented 5 years ago

Hey, that's odd! What version of cordova-file-plugin are you using? I'll patch it to support cdvfile:// URLs anyway I think.

Since v1.1.0 toURL shouldn't return cdvfile:// urls anymore. https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/#upgrading-notes

In v1.1.0 the return value of toURL() was changed (see CB-6394) to return an absolute 'file://' URL. wherever possible. To ensure a 'cdvfile:'-URL you can use toInternalURL() now.

Edit: Even more odd is that I cannot see the comment from @phillipplum :man_shrugging:

phillipplum commented 5 years ago

I use the plugin-version 6.0.1. Edit: Strange @Maistho :/

Maistho commented 4 years ago

I'm closing this PR since it probably shouldn't be merged. If this is still an issue I think adding some documenation in the README.md would be preferable.