banner
李大仁博客

李大仁博客

天地虽大,但有一念向善,心存良知,虽凡夫俗子,皆可为圣贤。

After Wordpress 3.9, loading Google fonts is slow.

Title: "Slow Loading of Google Fonts After Wordpress 3.9"
Date: "2014-09-29"
Tags:

  • "google"
  • "wordpress"
  • "plugins"

After upgrading Wordpress, it was noticed that the website took more than a minute to load when accessed from within China, which was extremely slow. However, when accessing the website from outside China using a VPN proxy, it loaded almost instantly. Initially, it was thought that the server was filtering Chinese IP addresses using a security dog, but even after disabling the security dog, the issue persisted. Switching to several different proxies within China also did not solve the problem, although the response delay when using Ping was normal. Later, using web debugging tools, it was discovered that every time the website was loaded, Wordpress would request font content from fonts.googleapis.com, and this request took a long time. Considering the recent actions of the Great Firewall of China (GFW), it was suspected that the issue was related to accessing fonts.googleapis.com. Finally, a solution was found through searching.

The solution is as follows: Install the "replace-google-fonts" plugin. It is safe and reliable.

Plugin description link: http://www.soulteary.com/2014/06/08/replace-google-fonts.html Plugin download link: http://www.soulteary.com/wp-content/uploads/2014/06/Replace-Google-Fonts.zip

Principle: Modify fonts.googleapis.com to fonts.useso.com. fonts.useso.com is a cloud font service provided by 360, and using it should not encounter any obstacles within China.

Added on 2015/03/06: Recently, the GFW has relaxed its control over the Google Fonts API, and fonts.googleapis.com is temporarily accessible. If the "replace-google-fonts" plugin is installed, it can be temporarily disabled.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.