Microsoft is experimenting with a new way to improve browser performance across Edge and (potentially) other web browsers. The idea is a simple one: restrict the performance of embedded web content, so one buggy element doesn’t bring down the whole page.
Web applications and websites frequently use embedded content like YouTube videos, social media posts, and advertisements, some of which might be third-party code that the website can’t properly optimize on its own. This creates situations where one buggy advertisement or video can slow down the entire website, eat up the device’s CPU and RAM resources, and potentially crash the browser tab or window.
Fixing this usually requires the site or web application to track down which embedded object is breaking something, and if it’s third-party content, either removing it or working with the content provider to fix it. Microsoft has an idea to bypass that whole problem: a browser-level feature that places limits on the performance of embedded content. It’s a bit like the RAM limiter in Microsoft Edge and other browsers, but instead of being controlled by you on a per-page basis, it’s set up by the website or web app and only applies to embedded content.
In a blog post for web developers, Microsoft explained two goals for the feature: “To make it possible for you to control the performance impact of the content you embed, and make it easy to do so, without having to determine exactly the individual constraints that are needed. And to make it possible for you to know when performance violations occur, so that you can understand when the user experience is negatively impacted by embedded content and improve the experience.”
The initial proposal includes a few different options for websites and web apps to reign in performance-heavy embedded content. The ‘basic’ option blocks “oversized assets” like large images and web fonts, and it sends alerts to the website owner for uncompressed resources. The “early-script” and “script” options prevent certain animations and other JavaScript-powered operations that can eat up bandwidth and processing power. The “globals” option places limits on the total CPU usage and number of frames.
Microsoft also said, “When it comes to optimizing performance, websites and apps are limited by the performance of the external content they embed; these can be 3rd party sites, 3rd party apps, and even content from other organizations within a company. Additionally, in cases where heavyweight apps transition to embedded scenarios, they may be optimized for standalone use but cause issues in an embedded context, impacting the overall performance of the app. As a result, being able to control the performance of embedded content is crucial to improving the overall performance of a site or app.”
This is just a proposal for now, and it isn’t functional yet in Microsoft Edge or any other web browser. If web developers and other companies building web browsers (such as Google and Apple) are interested in the idea, it may become a new web standard.
This seems like a great way to improve performance on websites that need to use embedded content, and it could keep our browsers from crashing from one broken video or advertisement. Lazy loading, which allows sites and web apps to avoid loading content that isn’t visible yet (such as an image halfway down an article), has been a significant performance improvement for many devices and websites. This proposal could have a similar effect if it moves forward and becomes widely implemented.
Source: Microsoft Edge Blog