Chrome’s new “cache partition” system will affect the performance of Google Fonts

The changes made in Google Chrome in October affected the performance of the Google Font service on millions of websites. The changes made are updates to Chrome’s internal caching system.

The browser’s cache system works by acting as a temporary storage system for images, CSS, and JavaScript files used by the website. Files stored in the cache can usually be reused across multiple sites instead of having the browser re-download each file for each page/tab loaded.

google-fonts

But with the release of Chrome 86 in early October 2020, Google has completely changed the way Chrome’s entire cache system works. Instead of using a large cache for all websites, Google has “partitioned” the Chrome cache, which will now store resources on a per-site and per-resource basis.

Although this is a big victory for user security and can prevent some forms of web attacks, this change affects web services designed around the old caching system.

One of these services is Google Fonts, a web portal launched in 2010 that hosts custom fonts.

Google Fonts allows website owners to load all fonts hosted on Google’s servers with a single line of JavaScript or CSS code.

New google fonts code

When Google Fonts was launched in 2010, the idea behind it was that as users navigated on the Internet, their browsers would load Google Fonts into the browser’s cache, and users would not need to renew it on each new website. Load custom fonts.

In turn, this will make the site load new pages faster, because they already include fonts in the cache.

However, in this week’s blog, Simon Wicki, a front-end developer from Berlin, pointed out that the new cache partition system that comes with Chrome 86 has actually invalidated Google Fonts because the new cache system will force users to re-download every one they visit All fonts on the website.

Wicki now says that with the benefit of cache reuse, website owners can download fonts from the Google Fonts website and host them on their own servers instead of the old method of loading fonts from Google’s servers.

As Wicki pointed out, the idea of ​​self-hosted custom fonts is not new and has been floating since 2018, when some web developers conducted research and came to the same conclusion.

Even Google itself recommended the same thing in the Google I/O 2018 speech. Either way, even if the era of Google Fonts as a CDN font seems to be over, the service will continue to operate as one of the largest repositories of open-licensed fonts available for free download on the Internet.

According to data provided by the BuildWith network statistics service, currently, more than 42.7 million websites use Google fonts.

In addition to Chrome, Safari has also used a cache partition system since 2013. Because the cache partition system has many security advantages, Mozilla also expressed interest in adding one to Firefox. Edge, Vivaldi, Opera, Brave, and other Chromium-based browsers are also expected to add support for cache partitions in the coming months.

Leave A Reply

Your email address will not be published.