# iFrame not working on session

**URL:** <https://forum.inductiveautomation.com/t/iframe-not-working-on-session/86676>\
**Category:** Ignition\
**Tags:** troubleshooting, perspective, ignition81\
**Created:** [March 1, 2024, 1:56pm UTC](https://forum.inductiveautomation.com/t/iframe-not-working-on-session/86676 "2024-03-01T13:56:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ali\_Ali](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@Ali\_Ali](https://forum.inductiveautomation.com/u/Ali_Ali)\
**Post date:** [March 1, 2024, 1:56pm UTC](https://forum.inductiveautomation.com/t/iframe-not-working-on-session/86676/1 "2024-03-01T13:56:53Z")

</div>

Hello everyone, I'm trying to view something on iFrame component. When I write the hostname in the src, it works fine in the designer and also in the perspective session on the gateway host (server). But it doesn't work on any of the clients workstations that are connected to the server.

```auto
http://serverhostname/test/something

```

So I tried to put the IP address of the server instead of its hostname. It stopped working in the designer once I put IP instead of hostname, so I tried to open the link in google chrome on the server, and I found that it asks me to authenticate.

```auto
http://serverIP/test/something

```

So I passed the username and password inside the URL and it worked fine in google chrome on the server.

```auto
http://username:password@serverIP/test/something

```

I put the same URL including the username and password in the designer, but it didn't work, and also didn't work for perspective sessions on server nor clients.

Any help would be appreciated

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [March 4, 2024, 9:23am UTC](https://forum.inductiveautomation.com/t/iframe-not-working-on-session/86676/2 "2024-03-04T09:23:53Z")

</div>

> [@Ali\_Ali](#):
>
> `username:password@`

This kinda thing is probably blocked by the webbrowser security for iframes.  
You should not use this as it would be to easy to recover the name and password when used in an iframe.

Are you trying to watch a perspective page in the iframe or is it something else you are hosting?

---

<div class="post-metadata">

**Author:** ![Ali\_Ali](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@Ali\_Ali](https://forum.inductiveautomation.com/u/Ali_Ali)\
**Post date:** [March 4, 2024, 11:36am UTC](https://forum.inductiveautomation.com/t/iframe-not-working-on-session/86676/3 "2024-03-04T11:36:25Z")

</div>

Yes, I totally understand that it's not recommended, but I'm trying to trace the issue.  
No, I'm trying to host something else.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [March 4, 2024, 12:27pm UTC](https://forum.inductiveautomation.com/t/iframe-not-working-on-session/86676/4 "2024-03-04T12:27:54Z")

</div>

> [@Ali\_Ali](#):
>
> it's not recommended

Its not just not recommended, its might activily be blocked by the browser.

> [@Ali\_Ali](#):
>
> `http`

are you using http or http? because this might also be a security issue blocked by the browser , try using https

in addition to one of the above you can also try adding in a "/" at the very end of the url.

> [@Ali\_Ali](#):
>
> No, I'm trying to host something else.

Are you in control of this hosted page, or is this something from an external website?

---

<div class="post-metadata">

**Author:** ![Ali\_Ali](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@Ali\_Ali](https://forum.inductiveautomation.com/u/Ali_Ali)\
**Post date:** [March 4, 2024, 1:52pm UTC](https://forum.inductiveautomation.com/t/iframe-not-working-on-session/86676/5 "2024-03-04T13:52:40Z")

</div>

I'm using http and it's blocked also inside Ignition designer and perspective workstation application not only on browsers. I tried "/" and didn't work either.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [March 4, 2024, 2:19pm UTC](https://forum.inductiveautomation.com/t/iframe-not-working-on-session/86676/6 "2024-03-04T14:19:33Z")

</div>

perspective workstation also uses a chromium browser

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 4, 2024, 4:39pm UTC](https://forum.inductiveautomation.com/t/iframe-not-working-on-session/86676/7 "2024-03-04T16:39:16Z")

</div>

Have you verified that the site you are trying to wrap in an IFrame **allows** wrapping in an IFrame? With the appropriate headers? Either an `X-Frame-Options` header (but that's now obsolete) or a `Content-Security-Policy` header? If not, you will not be able to use an IFrame.
