HA in Safari on macOS 26 loses connection

Hi everyone,

I keep a tab of HA open all the time in Safari to quickly check or change something. After updating macOS from Sequoia to Tahoe the HA tab will not show the current values if I switch to another tab for a while. When I return to the HA tab it says in the bottom of the page something like “Connection closed. Reconnecting…”

I suppose the new Safari more aggressively throttles what inactive website tabs can do. If I reload the page the current HA values will update again until I switch away to another tab for a while.

Any ideas what I can do besides switching to another browser or using the HA macOS app? This wasn’t happening in any earlier macOS/Safari version.

You probably have to search mac foruns for post on how to allow browser tabs to run in background.

I experience the same :frowning: Yes, there is a setting not to disoconnect background connection after 5 minutes, but it seems to be inneffective.
More over, at lest for me I see that refreshing the page also dos not help frequently. I need to try several times to get page reloaded. BUT, if I open HA within new tab, it loads instantly. I tried some other browsers available on Mac (Edge, Chrome, Atlas), none of these have the same problem. So seems something was screewed in recent versions of Safari :frowning:

Do you access the app via IP or hostname? I see this with IP only… There are some posts, that this is related to the tracker-blocking functionality…

1 Like

The reloading of the page tries to keep up with the backlog of data, which takes time.
Opening a new tab/page just loads the current data.

1 Like

Thanks everyone and especially Rene for the hostname trick! I experienced the same behaviour with tab reloading taking longer and it really seems to be the catching up with backlog data as Wally says. Reloading will take longer if the the tab has been longer in the background. A new tab or simply clicking my bookmark is instant.

But the important thing: If I connect using the hostname it immediately reconnects when I switch back to the HA tab. I was connecting via IP before.

Thank you for providing this. I had to figure out what my hostname was for Home Assistant. It’s been a while since I set it up. That said, for anyone who set theirs up on default values, going to homeassistant.local:8123 works. Although this is marked as a solution, it’s technically just a workaround. The real problem still needs to be resolved. Why is Safari now blocking my local IPs – the real problem isn’t in scope of this forum, but it would be nice to know the solution.

For additional information: the local IP for Home Assistant partially loads. However, it hangs during a call to URL: ws://192.168.1.242:8123/api/websocket

This is IMHO a Safari problem and needs to be addressed by Apple. I see this problem even in the latest macOS 26.2 Beta 2. And yes, it is clearly just a workaround and my post was just intended to provide a workaround until this gets fixed…

Off-topic:
Whenever you monitor the websocket usage over IP from your iPhone, it will become clear why Apple made this change. The Ad-industry is using this approach for tracking and overcoming ad-blockers like pihole…

Can someone please pin this in a FAQ? This is the first page finding a solution for this :slight_smile:

Yes, it definitely is a Safari problem and it started with macOS 26. For now I’m glad I can circumvent this using the hostname, but I hope a future update will remedy this.

Lolocalhost helps. But what should I do if I have two HA servers on my home network?

Not really sure what you mean.

localhost is a reserved name that refers to 127.0.0.1 on the local machine.
It is not an address that can be used on the network and you can not have 2 HA instances running on the same machine unless you use different ports and that will then be the way to distinguish them from each other.

You could change the name of your second HA instance via Settings, System, Network. (assuming you use HAOS)

1 Like

Thank you! It works!