iFrame (Inline Frame) working in remote machine but not in Gateway

I have two machines: Gateway (GW) and an Operator Work Station (OWS). A button component in a Perspective view launches a popup view filled entirely with an iFrame component. The source (src) property points to a HTML file in “C:\Program Files\Inductive Automation\Ignition\webserver\webapps\main”. Clicking the button brings up the iFrame popup with the intended HTML only in the OWS but not in the GW machine. Why? I have checked for typos etc

Solved! Thanks to tech support! More background info: the GW browser was using “http://localhost:8088/data/perspective/client/screen1” where as the OWS browser was using “http://gw-dns-name:8088/data/perspective/client/screen1”. Since the html file was hosted in GW and needed to be accessed by OWS (anywhere in the network), I gave “http://gw-dns-name:8088/folder/file.htm” as the src in iFrame. Apparently there is a browser side security feature called “same-origin policy error” which prevents redirecting the source for displaying a page. In this case, the browser in GW starts off with localhost but on clicking a button, the iFrame is trying to access a dns-name (even though that dns name resolves to the same IP addr) - this will throw a same-origin policy error. The OWS did not face this issue because the browser started off with a dns-name and iFrame was also reaching out to the same dns-name. Who knew :slight_smile:
PS: Troubleshooting tool: right click the browser (iFrame) >> Inspect, then choose Console tab to troubleshoot such issues

2 Likes