Hi all.
This issue is quite widespread on some machines and - after some of us have tried several fresh-installs - have had it reoccur, I believe that the ball is in Apple's court for resolving it but they have yet to acknowledge that they are aware of the issue other than what @jonasgs1 mentioned above (as in, those of us who've talked to Apple support have found the matter treated as if it's something unheard of). In bug reports they've been linked to the following thread where there's a much lengthier conversation about this:
Safari keeps crashing/freezing after install of El Capitan
I will warn you that it's difficult to follow as there is this issue, an issue with the Safari Flash extension, and a random assortment of Safari troubles being confused for each other and posted there. However, there are many pertinent messages if you have the time and are trying to chase the issue. If you don't, I'll repeat that this issue has been reported to Apple by many users who have followed their advice, ultimately ending in a fresh install with no change. From a few commenters comparing their problems, I reached the following observation:
System UI freezes when closing or switching a tab in Safari, often unfreezing after a minute but sometimes not
Under the following conditions:
- El Capitan (all versions)
- Safari (all versions)
- A HTML5 video was embedded and active on the page that was closed/switched from. Appears to be exclusively YouTube.
- Mid - 2014 mac
- Flash not installed
- No Extensions/extensions disabled
- Fresh install
There's a sizeable demographic having this exact issue with few variations (for example, Safari also froze for some under Yosemite and one or two have this issue with machines from surrounding years). There are also other situations where freezes have occurred but none noteworthy as being repeatable or regular. Personally, I've also seen some HTML5 videos embedded from Vimeo appearing as garbled graphics when they're in an unplayed state. They play fine and there's no other adverse issues.
I'll emphasise that it's the UI that's freezing, apart from the mouse cursor. If the UI stays frozen (happens to me about 1 in 3 times and I need to hard reset) anything that was running at the time continues to run (such as music playing, video renders, etc.) if the frozen system is left untouched. The console logs confirm that activity continued and shows that the system clock kept running and was correct, despite the UI freeze causing the displayed clock to show the moment the freeze occurred.