Google Chrome Dev Tools Mobile View not showing Iframe content

Viewed 54

I've noticed that the iframe I used within a pop up modal I made does not show in Google Chrome's mobile view from the developer tools. The content will show if I'm on desktop view and also when I'm adjusting the size of the browser window (Not using Chrome dev tools). On Safari, it works perfectly fine in the safari developer tools and desktop view.

I've made sure to set the X-frame content to SAMEORIGIN which I observed in the response correctly. I've also made sure both URLs are the same domain and both HTTPS. But the same issue still occurs.

Do you know any additional causes for this or what I can look into? I'm also open to other approaches/suggestions. Thank you for your time!

1 Answers

Since I can't change the way the browser handles iframe on different devices. I decided to deter away from working with the in-built PDF reader within each browser to instead using a react pdf library to spin up a PDF reader of my own.

https://www.npmjs.com/package/react-view-pdf

I was able to view the pdf on Google Chrome for both Desktop and Mobile devices!

Related