# Detect communications loss between Perspective Client and Gateway

**URL:** <https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 14, 2021, 6:11pm UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967 "2021-09-14T18:11:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![fil.rossi](https://avatars.discourse-cdn.com/v4/letter/f/bc79bd/32.png) [@fil.rossi](https://forum.inductiveautomation.com/u/fil.rossi)\
**Post date:** [September 14, 2021, 6:11pm UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967/1 "2021-09-14T18:11:40Z")

</div>

I’m working to resolve an exception scenario I discovered during testing.  
I’d like to be able to detect when there’s a comm loss between a perspective session (running on a PC) and the Gateway (on another PC). And then automatically switch to another page with messaging indicating there was a comms loss.

At present, when I disconnect the client from the network I see that there’s a small “No Connection to Gateway” banner that appears at the top. This presents two problems. 1) At a glance from a distance an operator may not notice this . 2) All existing states on the UI seem to be at their last state. It is problematic to display a system state that’s not necessarily true.

I know it’s problematic to run client side events/scripts as these execute on the gateway. Is there a way to display better (larger) messaging of a comms loss? Switch pages as I’d prefer? Or any other method to address client to gateway comm loss events?

---

<div class="post-metadata">

**Author:** ![jcoffman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jcoffman/32/6429_2.png) [@jcoffman](https://forum.inductiveautomation.com/u/jcoffman)\
**Post date:** [September 14, 2021, 6:54pm UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967/2 "2021-09-14T18:54:15Z")

</div>

Hi @fil.rossi, and welcome to the forums!

You can do this with Perspective Workstation through the new (8.1.6) [Fallback Redirect](https://docs.inductiveautomation.com/display/DOC81/Perspective+Workstation#PerspectiveWorkstation-Advanced-FallbackRedirectSettings) feature. It even supports returning to the original page once comms are re-established.

Hope that helps,  
Jonathan C

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 14, 2021, 8:06pm UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967/3 "2021-09-14T20:06:17Z")

</div>

I’m not sure if @jcoffman 's solution will suit, but if not, you might be able to look at modifying the display of the existing comms lost display by overriding the CSS for it in your custom CSS theme

---

<div class="post-metadata">

**Author:** ![fil.rossi](https://avatars.discourse-cdn.com/v4/letter/f/bc79bd/32.png) [@fil.rossi](https://forum.inductiveautomation.com/u/fil.rossi)\
**Post date:** [September 14, 2021, 8:18pm UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967/4 "2021-09-14T20:18:47Z")

</div>

Thanks @nminchin @jcoffman. Our client prefers to use a web browser instead of Perspective Workstation, for reasons that escape me. I’ll look into the Fallback redirect and perhaps make a case to switch to PW. I’ll also look into this CSS option. Thanks.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 14, 2021, 8:31pm UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967/5 "2021-09-14T20:31:33Z")

</div>

The selectors you’ll need to change are:

```auto
.connection-lost-banner {
    position: absolute;
    width: 100%;
    height: 3rem;
    top: -3rem;
    padding: 0.75rem 1rem;
    background-color: #194070;
    transition: top 0.3s ease-in-out;
}

```

and for the text:

```auto
.connection-lost-banner .connection-lost-message {
    color: #4E5665;
    font-size: 16px;
    line-height: 1.5rem;
}

```

You can modify this in your browser with your browser’s dev tools to test it and get it right before copying it into your theme.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/a/1a06dd5a71e9ae5110cd661790b3aca81f878a8b.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/e/4eb8e30f72ca1c4497cb98fe15722efdd35f562d.png)

---

<div class="post-metadata">

**Author:** ![fil.rossi](https://avatars.discourse-cdn.com/v4/letter/f/bc79bd/32.png) [@fil.rossi](https://forum.inductiveautomation.com/u/fil.rossi)\
**Post date:** [September 14, 2021, 8:46pm UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967/6 "2021-09-14T20:46:58Z")

</div>

Hey,

Thanks very much!

Best Regards,

Fil

---

<div class="post-metadata">

**Author:** ![kevin.jones](https://avatars.discourse-cdn.com/v4/letter/k/e9c0ed/32.png) [@kevin.jones](https://forum.inductiveautomation.com/u/kevin.jones)\
**Post date:** [July 3, 2023, 1:17pm UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967/7 "2023-07-03T13:17:15Z")

</div>

Howdy @nminchin - I'm just trying to get your CSS override suggestion from a few years ago working but it seems to only work when the dev tools is open - can you confirm if there is a way for these CSS overrides to be applied when dev tools is closed? It looks so much more obvious with the red/white! Thanks.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 3, 2023, 9:58pm UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967/8 "2023-07-03T21:58:40Z")

</div>

You can add them into the advanced stylesheet into the perspective project to have them permanent

---

<div class="post-metadata">

**Author:** ![kevin.jones](https://avatars.discourse-cdn.com/v4/letter/k/e9c0ed/32.png) [@kevin.jones](https://forum.inductiveautomation.com/u/kevin.jones)\
**Post date:** [July 5, 2023, 2:44pm UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967/9 "2023-07-05T14:44:03Z")

</div>

Ahhhh, I didn't realize that was a thing. I got it working. One further question - can I change the text that is displayed? I'm not savvy with the web stuff - I see the "No Connection to Gateway" text in the web page elements but is that something can set also via the stylesheet? Thanks for the help!

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 5, 2023, 8:14pm UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967/10 "2023-07-05T20:14:41Z")

</div>

Not via CSS, no - CSS can only style existing dom elements. There was a post the other day about being able to affect the base HTML doc or something that _may_ be able to modify the text? but it would be _very_ unsupported. I can't find the post.. but someone else may know what I'm talking about @victordcq?

---

<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:** [July 6, 2023, 6:32am UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967/11 "2023-07-06T06:32:41Z")

</div>

**i would first check if you can put this in the translation mananger and just change it in there**

But you can create new content with css using a :before or :after selector with content:'string'

i cant rly test the lost connection banner rn, but i guess it could look like this

```auto
.connection-lost-banner .connection-lost-message {
    visibility: hidden;
    position: relative;
}
.connection-lost-banner .connection-lost-message:before {
    visibility: visible;
    position: absolute;
    top: 0;
    left: 0;
    content: "This text replaces the original.";
}

```

something like this isnt really recommanded though, wont work with translation and stuff.

---

<div class="post-metadata">

**Author:** ![Simen](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Simen](https://forum.inductiveautomation.com/u/Simen)\
**Post date:** [September 18, 2026, 12:12pm UTC](https://forum.inductiveautomation.com/t/detect-communications-loss-between-perspective-client-and-gateway/50967/12 "2026-09-18T12:12:01Z")

</div>

FYI, if anyone is using this to warn operators about connection loss.

Ignition has at some point renamed the element from .connection-lost-banner,  
to .connection-banner.

If you are still using the .connection-lost-banner in your stylesheet.css, from v8.3.9 it will not work. (and probably quite a few versions prior.)
