Topics Various subjects that interest me
Query monitor twig profile WordPress performance plugin
WordPress 5.6 is going to update jQuery from version 1.12 to 3.5.1. This move is going to save incredible amounts of data; improving user experiences and saving money. Let’s do some back-of-the-napkin calculation what kind of savings we are talking about!
As said in the intro: coming WordPress releases will update jQuery from an old version (1.12.4, released may 2016) to a newer version (3.5.1). In the process, they will also update jQuery UI and remove jQuery migrate.
The following roadmap was published in the announcement:
In the list of warning messages jQuery migrate can generate we find the following note:
The use jQuery Migrate in production has performance impacts and can complicate debugging as it modifies the normal behavior of the version of jQuery being used.
Removing jQuery migrate 1.4.1 immedietly saves downloading 10.1kb (4kb gzipped) on every first request to a domain.
Between jQuery 1.x and jQuery 2.x support for Internet Explorer 6/7/8 was dropped. This resulted in about 12% smaller file. Since then, the size of jQuery has crept back up. The 3.5.1 minified, gzipped production download is a 31.4kb download.
Removing jQuery migrate, and updating jQuery itself, reduces the network payload by about 7.3kb and eliminates a request. This by itself might not seem as much, but WordPress has a very large reach.
As described by Danny van Kooten in his post ‘CO2 emissions on the web’:
Shaving off a single kilobyte in a file that is being loaded on 2 million websites reduces CO2 emissions by an estimated 2950 kg per month.
Danny’s plugin (Mailchimp for Wordpress) is actively used in 2 million+ sites. Amazing. But WordPress core is on a different level.
There’s a lot of numbers floating around on the internet on WordPress usage and visitors.
WordPress powers > 35% of the internet. Including some of the very large sites like Playstation, TechCrunch, (international eiditions of) Business Insider and the New York Post.
However, it’s very hard to estimate the number of sites (and monthly unique visitors) these sites would have.
Considering that the number of total active websites is estimated at over 1.3 billion according to a survey published by Netcraft, that means that around 455,000,000 websites are using WordPress right now, which means that around 20% of all self-hosted websites use WordPress, which is still huge. Analysis by ‘Who is hosting this’.
I think the 455 million active sites they reach in the analysis is a bit overestimated. And if the number is remotely right, a large part of these sites might not have any noteworthy traffic.
WordPress.com gathers data of 409 million unique visitors per month on sites tracked by Jetpack. I know Jetpack is not installed on a lot of sites, so this number is greatly underestimating the number of visitors this change will reach. However, it’s the most reliable number I have access to.
409.000.000 people. Not downloading jQuery migrate and downloading a smaller jQuery payload.
?ver=
) which downloads resources on update.As mentioned in ‘CO2 emissions on the web’ one GB of data transferred consumes around 0.5kWh of energy.
(0.5 kWh / 1.000.000KB) * 7,3KB = 0,00000365 kWh per non-cached visit.
409.000.000 unique visits * 0,00000365 kwh =
1492,85 kwh per month.
This is the very lowest estimate I could make. In reality I estimate a multiple of this, as Jetpack runs on just a part of all sites using WordPress.