NEW227533
WKWebView: Application Cache is not working in an iframe with a different domain
https://bugs.webkit.org/show_bug.cgi?id=227533
Summary WKWebView: Application Cache is not working in an iframe with a different domain
Kiran S
Reported 2021-06-30 09:31:12 PDT
Overview In WKWebView Application cache does not initialize correctly when loaded in an iframe from a different domain. This was also observed on Safari iOS and MacOS, but since Safari has Service Worker support it is not an issue. Note: Although Application Cache is a deprecated technology. In WKWebView it is the only option for offline support with Non App Bound Domains where service worker is not available. Steps to Reproduce 1. Load "https://ksdev.app/iframe.html" in iOS WKWebView or Safari. This page automatically embeds a different domain iframe which uses app cache. The app cache state changes are also indicated via alerts Actual Result Appcache goes from "Checking" state to "Error" state. Initialisation does not complete. Expected Result Appcache loads without any error. Additional Info Our app uses a WKWebVieW and we have a use case where it is necessary to load external URL's as iframes. These URL's are expected to work in offline as well. These URL's are provided by the customer and its not possible to know them before hand. So App Bound Domains are not feasible in this case. Application cache seems to be the only option.
Attachments
Radar WebKit Bug Importer
Comment 1 2021-07-07 09:32:23 PDT
Note You need to log in before you can comment on or make changes to this bug.