Many desktop applications, like Discord and Spotify, are based on web technologies and usually eat up system resources than proper native apps. Microsoft has been working on an alternative to the Electron framework that most web-based apps use, and now it’s rolling out on Windows 10.
Microsoft announced that the WebView2 runtime is rolling out to all Windows 10 PCs, if they’re running the April 2018 Update or later. The component was already included in Windows 11, but before now, applications had to bundle the entire runtime (increasing download sizes and complexity) if they wanted to use WebView2 on Windows 10. Now that the component will be on even more PCs, it might become a more popular choice for web-based apps.
Slack, Discord, Skype, Spotify, Visual Studio Code, and countless other desktop applications are built with Electron, which is based on the same engine that powers Google Chrome, Microsoft Edge, and other browsers. The framework has made it much easier to create cross-platform applications, but Electron apps are notoriously CPU and memory-hungry, which leads to a slower computer and decreased battery life on laptops.
Microsoft has been working on ‘WebView2‘ for Windows 10 and 11, which is mostly intended for Windows applications that need to embed web pages (like login forms). However, WebView2 can also power entire applications on its own, much like Electron — Microsoft Teams on Windows 11 is a WebView2 application.
WebView2 brings a few advantages to web-based apps. Since the runtime is included in Windows 11 and 10, applications don’t need to bundle the entire engine with their apps, cutting down on file sizes and download times for updates. If apps use the included runtime (developers can still choose to bundle a specific version if they want), they’ll receive performance and battery life improvements from new versions of WebView2 as Microsoft continues to improve it.
There aren’t many applications using WebView2 right now, but now that it’s rolling out to millions more PCs, it might start to become a popular alternative to resource-intensive frameworks like Electron. We could all use more apps that don’t drain batteries and eat up RAM.
Source: Microsoft Edge Blog
Originally posted 2022-11-09 12:18:37.