New in browsers: Firefox 66 blocks video and sound by default, Chromium limits page budget
Important changes may occur in the upcoming versions of Firefox and Chromium.
First, in Firefox 66 for desktops, the default is to automatically block video and audio on all pages. The Mozilla Hacks blog warns developers in advance . Video and audio playback is permitted only through the
HTMLMediaElementAPI and only after the user interacts with the page (click of a mouse, pressing a button or touching the touchscreen).
Even more interesting changes can occur in Chromium.
At the same time allowed to automatically play a video with muffled sound. For such content you need to
HTMLMediaElementset the attribute “muted” to true. The screenshot shows that users can manually disable sound blocking for individual sites.
In Firefox for Android, the new implementation will replace the existing auto-play blocking mechanism.
Technically, Firefox blocks a call
HTMLMediaElement.play(), returning an error
NotAllowedError. All browsers with similar functionality do the same. Accordingly, web developers should not assume that the call
play()will always be successful. To avoid blocking, two options are recommended. First: start playing content in conjunction with an event handler, for example, KeyboardEventon the desktop or touchend for Android. Second: start autoplay without sound (it is allowed by default) and show the user a button to turn on the sound.
The final version of Firefox 66 is scheduled for release on March 19, 2019 , so developers have time to prepare.
Mozilla is currently working on automatic blocking of Web Audio content : it is promised until the end of 2019.
Budget for web pages
Changes in Chromium are still under discussion. Not the fact that the corresponding commit will be included in the main branch. But the idea is very interesting.
On February 4, 2019, one of the developers, Alex Russell, presented commit 1265506 (“Never-Slow Mode”) . He proposes to introduce into the browser an additional mode
--enable-features=NeverSlowModethat will limit the budget of each web page , thereby ensuring fast loading.
Alex Russell - one of the leading developers of Chrome, Blink and the web platform at Google, the author of the article “Can you afford it? The budget of web productivity in the real world "which transfer was published on Habré.
Illustration from the article by Alex Russell
- The size of one picture: 1 MB
- Volume of all pictures: 2 MB
- One CSS style sheet: 100 KB
- All CSS style sheets: 200 KB
- Maximum script size: 50 KB
Naturally, the user will include this feature as desired. For example, if it works via a slow Internet connection, on a weak device (an outdated computer), etc. A budget constraint ensures fast loading and the absence of brakes, but it increases the likelihood that the page will not load to the end.
Obviously, the budget should be reviewed periodically, focusing on page load time.
Page budgeting is a sensible idea. Many users and specialists note that over the years, programs and web applications have not become faster at all, despite the significant increase in computer performance.
For some reason, application requests grow faster than hardware performance. As a result, every year the software becomes slower , and websites are getting fat .
The trend is that the software does not become faster and more functional. We get faster hardware, on which software with the same functions is turned more slowly than before. Everything works much slower than the maximum speed. Have you ever wondered why your phone boots from 30 to 60 seconds? Why can't it boot, say, in one second? There are no physical limitations here. Personally, I would like this. I want the developers to reach the limit, using every bit for performance. - From the article “My disappointment in software”Perhaps the budget of the web pages will help solve the problem if other Chromium developers agree to Russell’s commit.