I haven’t been able to find an answer that works. I have an iframe (yes, I have to use an iframe on this occasion) that works fine on PC, but won’t load on mobile or tablet at all.
src and it still doesn’t load anything in the iframe.
Below is a simplified version of my page, using what I have been able to find from other suggestions.
Can anyone tell me why it isn’t working on mobile? Thanks
UPDATE: Clearing the browser cache on tablet fixed it for that, but doing the same on mobile didn’t do anything. I also tried using my friend’s iPhone (they have never visited the site before) and it didn’t load.
The URL I am trying to display in the iframe works in iframes on demo sites like w3schools on my mobile so it’s not an
x-frame options or browser not allowing any iframes problem (though the x-frame options would stop it working on all devices, but I’ve checked everything I can think of)
I can provide a live example URL via message if required.
The problem was as I had suspected – the URL of the iframe was calling some unsecured elements and certain browsers on mobile and tablet (and Firefox on desktop) do not display anything if the content is mixed between secure and non-secure (my domain is all https).
Now that those are fixed and everything is hosted/called securely, clearing the cache completely and reloading the page fixes the problem even on mobile browsers.
The reason it was working on tablet and not mobile was purely down to timing and when the different elements https links were broken (redirecting to http instead) and when the different pages were cached.
It’s 2019 now, as of testing with mobile safari and chrome, no matter the host page uses http or https, the iframe url must use https. http iframe don’t load at all.
I faced a similar issue with iframe and cross-domain access over WebView of iOS. The problem was with Cookie Acceptance which was causing issues.
The problem was the Cookie Security policy (HTTPCookieAcceptPolicy) for UIWebView, which previously defaulted to NSHTTPCookieAcceptPolicyAlways.
But from iOS 7, it got defaulted to NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, breaking my app.
You problem does not look to be same, but might be on the similar lines.