As a temporary fix whenever this happens to my M1 Max MacBook Pro running macOS 12.5, I've used the following steps:
- Ensure that this particular problem is happening by opening an entirely different web browser and visit a simple page like https://example.com/ — if it hangs there as well, we need to continue
- Disable the Wi-Fi connection via either Settings > Network > Turn Wi-Fi Off, or by using the Menu Bar dropdown for Wi-Fi
- Wait for the hanging webpage tabs to recognize the dropped network connection (easiest to track the fresh web browser in step #1)
- Re-enable the Wi-Fi connection
I think the underlying issue is that I migrated from an Intel-Based MacBook Pro—I've never seen this issue with two other M1-based MacBooks I used regularly, and neither of them had been migrated from an Intel-based MacBook. The behavior also seems to show up only when I'm opening several tabs in rapid succession, though I'm less confident on that count.
I strongly suspect that completely erasing all content and settings on the MacBook would fix the issue—there's probably a network setting somewhere that was migrated when it shouldn't have been. I haven't yet reached the level of desperation/annoyance necessary to try that fix, though, and have not yet determined which network setting is the problem.
In addition to the troubleshooting steps listed in the original question, I've also confirmed that:
curl works fine in Terminal when the browsers (Google Chrome and Safari) are both acting up
- Disabling the built-in firewall does not prevent the issue from happening
EDIT: (7 months later) I'm still living with this problem, but another (strange) workaround I've found is to avoid opening new websites too quickly.
Most simple websites work just fine, but I've found these sites to reliably trigger the behavior when I visit them in new tabs in Google Chrome:
- mail.google.com (refreshing the inbox in an already-open tab can trigger here)
To safely visit those websites, I open a new tab, type the website name to get it to autocomplete, then count to ten before hitting Enter. Weirdly, this seems to completely prevent the bug from triggering!