Apple Event: May 7th at 7 am PT

Troubleshooting a 4-5sec delay before any WebKit content starts loading (even local content)

Since a few days, the strangest thing has been happening on my Mac running macOS 14.2.1 23C71: when I open a new Safari tab and type in the address of any website (even a localhost address), it takes about 5 seconds before the page starts loading. The loading itself is fast (I have a fast internet connection), but there seems to be a delay before it starts loading.


Important detail: during this loading, no network activity is observable (neither in the WebKit Inspector nor via tools like Proxyman).


I think a connectivity problem can already be ruled out, because:


  • I have emptied the browser cache, cleared the DNS cache, uninstalled AdBlocker, set alternative DNS servers, rebooted several times, installed latest updates etc. 
  • I have tried it via other Internet connections (even in other physical locations), via Wi-Fi and Ethernet.


The problem always consistently persists, but (also important): it does not occur in other (non Webkit browsers) such as Chrome, Arc and Firefox. There, loading starts immediately.


So my preliminary conclusion is that it has something to do with Webkit itself, and more specifically with the WebKit System Framework. This suspicion is reinforced by the fact that in Mimestream, the email app I use, I notice the same delay in loading emails when I open them in a new window (thus presumably loading a new instance of the Webkit System Framework). I made a small video to demonstrate this:



Here are a few more things I tried:


  • I emptied all caches and closed all background processes (as far as possible.
  • I have reset all network settings.
  • I uninstalled and reinstalled Mimestream (and all settings).
  • I ran sudo killall -HUP mDNSResponder.
  • I restarted the computer in Safe Mode.
  • I installed Safari Technology Preview (which contains a new version of Webkit) and the same problem occurred there.


Finally, I created a completely new macOS profile. There the problem does not occur! There, the Webkit content loads immediately.


So, there must be a setting somewhere (or a plist setting) that introduces this strange "delay" when loading Webkit content.


The issue is that switching to a new profile would mean starting from scratch, which is not ideal since my current profile is extensively configured with settings, software licenses, etc. It would take days to reproduce that environment. So, I suspect there is a small setting somewhere that I am overlooking, but I don't know what it could be.


I appreciate any help!


Posted on Jan 3, 2024 3:10 AM

Reply
8 replies

Jan 3, 2024 7:02 AM in response to Roel Van Gils

Good job troubleshooting so far.


Since it appears to be specific to one user account, and you have already dealt with caches, dns, etc, the most likely cause is some third party software (login item, or user agent) that loads specifically for this account.


Please run Etrecheck and post its full report here. Use the "additional text" button and paste the report into the text box.

Jan 3, 2024 8:13 AM in response to Luis Sequeira1

Thanks for having a look! 🙂


About the Automatic Security Updates. Could it be possiblel that EtreCheck misreported this? When I check System Settings, these are all on:



You got me: SIP was indeed partially disabled 🙂 It was a requirement for Yabai to run properly (a utlity that I'm quite a fan of). I was aware of the risk. In any case, I now re-enabled SIP completely (by logging in to the recovery partition and using the Terminal command csrutil enable) to absolutely rule out that this has something to do with my issue.


"More than one antivirus": ah, I think EtreCheck considers AdGuard to be an anti-virus program too. It's not really, but still 🙂 I did uninstall it and also completely removed its system extension.


Actually, I uninstalled all system extensions I had installed to eliminate the possibility that one of them was causing the issue.


sudo systemextensionsctl uninstall Q248YREB53	com.reincubate.macos.cam.avextension
sudo systemextensionsctl uninstall 2MMRE5MTB8	com.obsproject.obs-studio.mac-camera-extension
sudo systemextensionsctl uninstall 97Z3HJWCRT	com.opalcamera.Opal.v2.opalCameraExtension
sudo systemextensionsctl uninstall 388X9C8CWR	com.appblit.screegle.camera
sudo systemextensionsctl uninstall UA6JCQGF3F	com.redcanary.agent.securityextension
sudo systemextensionsctl uninstall G43BCU2T37	org.pqrs.Karabiner-DriverKit-VirtualHIDDevice
sudo systemextensionsctl uninstall MLZF7K7B5R	at.obdev.littlesnitch.networkextension
sudo systemextensionsctl uninstall 78UFGP42EU	ch.tripmode.TripMode.FilterExtension
sudo systemextensionsctl uninstall TC3Q7MAJXF	com.adguard.mac.adguard.network-extension
sudo systemextensionsctl uninstall S8EX82NJP6	com.macpaw.clearvpn.macos-setapp.system-network-extension


I know for all of these system extensions what they do (or did) and why I installed them in the first place. But for now, I can live without them. They're all gone now (when I run systemextensionsctl list, the list is empty.)


And finally, I also completely uninstalled CleanMyMac and removed all of its orphaned files! 😉


I rebooted again and... still no luck! ☹️ The 4-5 seconds delay for loading Webkit content is still there.


Any other ideas? 😁

Jan 3, 2024 7:57 AM in response to Roel Van Gils

SIP is disabled - this is a security risk. In the rare cases where one may need to disable it, it should then immediately be reenabled.


Automatic security updates disabled. These are different from general OS updates. I recommend leaving the OS updates on manual, but not the security updates.


More than one antivirus - that is almost certainly the problem!

And let's see who those are... of course!


You have the darned "cleanmymac" - better known here as "brickmymac".


Please, completely uninstall this **** and restore SIP and security updates.


Now, it could be that there are some other problems, but this is so egregious I have to say it right away.


I will have a look at the rest of the report and will come back.

Jan 3, 2024 8:26 AM in response to Luis Sequeira1

Hm yes, this also caught my attention! 😁 I deactivated the host file, but no luck.


By the way, the "corrupt" entries that EtreCheck identified were in fact just a few (I believe) harmless records with very short names that had been there forever (long before the issue arised).


127.0.0.1 dev
127.0.0.1 cmd
127.0.0.1 sh
(and a few more)

Troubleshooting a 4-5sec delay before any WebKit content starts loading (even local content)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.