The text/ocean

Introduction to the

On January 19, 2021, Chrome released the M88 two months later. The notable feature of this release is the completion of several major roll-out plans, including FTP, Flash, WebComponents V0, mixed content downloads, etc.

New stability function

Manifest v3

Chrome 88 now supports extensions built using Manifest V3 that users can upload to the Chrome Web Store. Manifest V3 is a new extension platform that makes Chrome extensions more secure, more efficient, and more respectful of privacy.

Manifest V3, for example, does not allow remotely hosted code, which helps Chrome Web Store reviewers better understand the risks associated with extensions and allows you to update extensions faster.

For another example, it introduces service workers to replace background pages, because service workers only exist in memory as needed and consume fewer system resources.

For more information, follow the link that shows you how to migrate an existing extension to Manifest V3.

The CSS aspect – thewire properties

Previously, only certain elements had aspect ratios, such as image. For them, we simply specify the width or height, and the element automatically calculates the other based on the inherent aspect ratio.

<! -- Height is auto-computed from width & aspect ratio --> <img src="..." style="width: 800px;" >Copy the code

In Chrome 88, the aspect-ratio property lets you explicitly specify aspect ratios to achieve similar behavior.

.square {
  aspect-ratio: 1 / 1;
}
Copy the code

You can also implement progressive enhancement with CSS4’s NOT selector.

.square { aspect-ratio: 1 / 1; } @supports not (aspect-ratio: 1 / 1) { .square { height: 4rem; width: 4rem; }}Copy the code

To view demo, go to the link.

Significantly limit chained JavaScript timers

To reduce CPU and battery usage, Chrome has been optimizing hidden pages since M87, where chained JavaScript timers for hidden pages are severely limited in certain circumstances.

If you call the same setTimeout within a setTimeout, this is equivalent to a chained call:

let chainCount = 0;

function setTimeoutChain() {
  setTimeout(() => {
    chainCount++;
    console.log(`This is number ${chainCount} in the chain`);
    setTimeoutChain();
  }, 500);
}
Copy the code

In Chrome 88, your setTimeout call is throttled when all of the following conditions are true:

  • The page has been hidden for more than 5 minutes (the user is currently on another page)

  • Your chain calls count 5 or more times

  • The page has been muted for more than 30 seconds

  • Don’t use WebRTC

In this case, the browser will check the timer every minute, and the logic in your timer will be processed in batches every minute. Chrome officially recommends using setInterval to solve this problem.

For more information, please go to the link.

Discard & delete functionality

Pop-ups are not allowed during page uninstallation

Since Chrome 80 are not allowed to use the window when page unload. The open method to open the new page, but the enterprise users can AllowPopupsDuringPageUnload field to allow the page unload when open the popup window. Starting with Chrome 88, this field will also be abolished.

Disable FTP completely

Chrome FTP is low in usage, buggy in implementation and security risks, and there are better FTP clients available on all platforms, so it’s not worth maintaining. From M72 onwards, Chrome began to disable FTP. From M86 onwards, Chrome officially started to disable FTP. By the release of version 88, FTP was completely disabled.

  • Chrome 86: FTP is still enabled for most users by default, but FTP is disabled for pre-release Channels and will be turned off experimentally for 1% of stable users. In this version, users can re-enable it from the command line using the –enable-ftp command or –enable-features=FtpProtocol.

  • Chrome 87: FTP support will be disabled for 50% of users by default, but FTP support can be enabled using the flag listed above.

  • Chrome 88: FTP support is completely disabled

Disabling Flash completely

Chrome in version 83 turned on further prompts for using Flash, such as another warning if a prompt to activate the Flash plugin results in a state change.

Flash reached the official end of its life on December 31, 2020, when Adobe officially stopped supporting the software. On January 12, Adobe began blocking Flash content directly.

Disable mixed content downloads completely

In the process shown above, starting with M81, Chrome blocks mixed content downloads and turns on blocking for different file types in each version. By M88, Chrome blocks mixed content downloads for all file types completely.

Delete WebComponents where v0

The WebComponents V0 rollout that began with the M80 version has finally come to an end with the M88. Chrome no longer supports Web Components V0, replacing it with Web Components V1, and Safari, Firefox, and Edge all support this change.

The resources

  1. Developer.chrome.com/blog/new-in…
  2. Mp.weixin.qq.com/s?src=11&ti…
  3. Mp.weixin.qq.com/s?src=11&ti…