iOS 18 Beta 5 Safari Distraction Control: How It Works

Apple's latest iOS 18 Beta 5 introduces a practical new feature in Safari called "Distraction Control." This tool allows users to remove elements from a webpage they're currently browsing, aiming to provide a cleaner and more focused browsing experience.

How Distraction Control Works

Hiding Elements

Distraction Control works by hiding specified elements on the webpage using CSS. Specifically, it sets the display: none property for the selected elements. This means that while the elements are still present in the DOM (basically HTML in layman's terms), they are not visible on the page. Users can select any element on the page, such as ads, pop-ups, or even persistent cookie banners, and hide them with ease. Notably, the display property is set as a CSS property, not as an inline attribute in the DOM.

0:00
/0:07

Inspection of how it works, eliminating annoying ads

Persistent Across Tabs and Page Loads

Once an element is hidden using Distraction Control, this change remains persistent for an extended period, including across tab switches and page reloads. This ensures that distractions don't reappear as you continue your browsing session.

Toggling Hidden Elements

The feature also includes the option to show hidden elements again if needed. This is useful if you need to interact with an element later or if you accidentally hide something important.

Limitations and Considerations

Local Only

Currently, Distraction Control does not sync across devices. Changes made on one device are not reflected on another. While this may be sufficient for many users, syncing across devices could be a valuable enhancement in future updates.

Dynamic Web Content

It remains to be seen how Distraction Control handles websites or web apps that generate dynamic DOM elements, CSS classes, or other selectors. These dynamic changes can make it challenging to persist hidden elements, as the identifiers for these elements may change or regenerate, potentially bringing back previously hidden elements.

Final Look

Distraction Control in iOS 18 Beta 5 Safari is a useful feature for streamlining browsing by hiding unwanted elements from webpages.

By setting elements to display: none as a CSS property, users can enjoy a cleaner, distraction-free interface that is consistent across their browsing session and beyond. As it stands, Distraction Control provides local-only functionality, but there is potential for future improvements that could make this feature even more powerful.

Everyone can appreciate the simplicity and effectiveness of this new tool, making it easier to focus on the content that matters most. However, its effectiveness with dynamic web content remains to be fully understood, and this will be an area to watch as the feature evolves.