January 16 2023

Why not use mod_pagespeed for web performance?

Some still use mod_pagespeed or ngx_pagespeed to improve their website performance, but at what cost?

Google-mod_pagespeed-TTFB

If until 2019 we used enthusiasts in some cases mod_pagespeed for Apache and the respective ngx_pagespeed for NGINX and we also felt in the mood to recommend it as we have done in this article mod_pagespeed and ngx_pagespeed. Google modules for Apache and NGINX Webserver to improve performance. , today more than ever the time has come to announce to the world that it has been at least since 2020 that it no longer makes sense to use a project that is now abandoned, dead and buried.

But let's go back briefly to the previously discussed topic by explaining, albeit this time in a more approximate way, what mod_pagespeed is and what were the initial objectives desired by Google itself.

What is mod_pagespeed?

mod_pagespeed is an Apache module created by Google to improve the performance of web pages. The module uses various techniques to optimize the page content, such as image compression and minification of CSS and JavaScript, in order to reduce the page loading time.

Google created mod_pagespeed to help webmasters improve the speed of their web pages. Page loading speed is an important factor in user experience and search engine rankings.

mod_pagespeed was first launched in 2010 as an open source project and has received numerous features over the years. For example, it can optimize images to reduce their weight without compromising quality, automatically generate responsive images to optimize viewing on mobile devices, and minify CSS and JavaScript code to reduce the amount of data to download .

In 2018, Google announced it was stopping active development of mod_pagespeed, but continued to provide support for the existing version until 2021. After that the project was officially abandoned and there is no longer any support or update from Google.

What is ngx_pagespeed ?

ngx_pagespeed is a port of mod_pagespeed for the NGINX web server. This is a module that allows system administrators to use the same performance optimization features as mod_pagespeed on an NGINX server.

The ngx_pagespeed project was created by a group of independent developers who wanted to port the mod_pagespeed functionality to a web server other than Apache. The ngx_pagespeed module was first released in 2012 and has consistently received updates and new features over the years.

Like mod_pagespeed, ngx_pagespeed uses virtually the same techniques to optimize web page performance, such as image compression, minification of CSS and JavaScript, and optimization of browser requests. In addition, ngx_pagespeed allows system administrators to granularly configure optimizations to be applied to web pages, allowing them to tailor performance to the specific needs of their website.

Even though ngx_pagespeed was created by independent developers, received support from Google until 2018, when Google announced that it has stopped active development of mod_pagespeed. After that, ngx_pagespeed was also abandoned and there is no more official update or support available.

Where is mod_pagespeed still used?

Many control panels like Plesk or cPanel offer mod_pagespeed as a feature to improve the speed and pagespeed score of websites. These control panels allow system administrators to easily activate and configure mod_pagespeed to optimize the performance of their web pages.

In Plesk, mod_pagespeed is available as an add-on or better as an additional extension which can be easily installed and configured by the server administrator. Once installed, Plesk provides a graphical interface for configuring mod_pagespeed settings, such as image compression, minification of CSS and JavaScript, and optimization of browser requests.

cPanel also offers mod_pagespeed as a server performance optimization option. As in Plesk, mod_pagespeed can be easily activated and configured by the server administrator. cPanel also offers a graphical interface for configuring mod_pagespeed settings and viewing the results of performance optimizations.

Even though mod_pagespeed is no longer actively developed by Google, Plesk control panels and cPanel continue to use it as a feature to improve the speed and pagespeed score of websites. However, being an abandoned project, there are no more updates or official support available for these tools.

Why still use mod_pagespeed or ngx_pagespeed ?

Information Technology is a rapidly evolving branch, e what is considered correct today may not be correct tomorrow. Technology and the way users interact with it are constantly changing, and developers and system administrators need to be able to adapt to these changes to ensure that their websites always perform well and meet user needs.

Often when doing searches on the net to optimize a website, one comes across old posts, articles and guides that refer to a very specific period, the reader is not able to understand the context of what he reads and mistakenly thinks that that optimization guide that recommends mod_pagespeed is still in vogue and therefore they lend themselves to following obsolete tutorials that not only do not bring benefits in terms of performance, but are even harmful.

Google, as a leader in the search engine industry, has developed several metrics and scores over the years to evaluate the quality and performance of websites. For example, Google introduced i Google Core Web Vitals, a set of metrics that evaluate the speed, interactivity and visual stability of web pages, and the PageSpeed ​​Insight score, which evaluates the speed and performance of web pages on mobile and desktop devices.

These changes in website quality metrics have had a significant impact on the mod_pagespeed tool created by Google. Initially designed to improve web page performance using various optimization techniques, mod_pagespeed quickly became obsolete due to the evolution of Google's evaluation metrics. In some cases, using mod_pagespeed can even have a negative impact on web page performance, as the optimizations applied by the tool may no longer be in line with current Google guidelines.

mod_pagespeed and Time To First Byte.

Il Time To First Byte (TTFB) is a metric that measures the time between the browser requesting a web page and receiving the first byte of data from the server. It is considered an indicator of server speed and network latency. A high TTFB indicates a slow server or a slow network connection, while a low TTFB indicates a fast server and a fast network connection.

TTFB is one of the important metrics in Google Core Web Vitals, a set of metrics introduced by Google to evaluate the speed, interactivity and visual stability of web pages. These metrics are important because Google uses this information to evaluate the quality of websites and to determine their placement in search results. A high TTFB can negatively affect the user experience and visibility of the website on search engines.

Google itself strongly recommends a maximum TTFB of 200 milliseconds, obviously an optimal value is certainly less than 100 milliseconds and as we will see, mod_pagespeed doesn't help lower TTFB as many still believe.

Someone on the net had already noticed the problem and had also opened discussions on GitHub, but at that time the focus was almost exclusively on Pagespeed scores with very questionable metrics and which did not take into account the importance of TTFB.

You can follow the original post (screenshot below) at this link: https://github.com/apache/incubator-pagespeed-mod/issues/1293

Another warning appeared in a StackOverflow thread where it was bluntly mentioned that mod_pagespeed was increasing TTFB. You can read the original though inconclusive thread at this link: https://stackoverflow.com/questions/24099190/google-nginx-pagespeed-with-varnish-increases-ttfb

StackOverflow mod_pagespeed Varnish TTFB

It is certainly not easy to guess and understand that although mod_pagespeed is an Apache module designed to improve the performance of web pages using various optimization techniques, can cause a web page's Time To First Byte (TTFB) to increase due to the latency introduced by its optimization operations because it performs optimization tasks such as compressing images, minifying CSS and JavaScript, and optimizing browser requests. These operations take time to perform, which can cause TTFB to increase.

Furthermore, mod_pagespeed uses a caching algorithm to cache optimized web pages and reduce the latency of subsequent requests. However, if the caching algorithm is not configured correctly, it can cause TTFB to increase because the server must first fetch the web page from the cache before sending it to the browser.

A real world example of how mod_pagespeed slows down a WordPress site.

For example, let's take a look at a site like lavocedeltrentino.it, a well-known newspaper that thought it could solve the performance problems of their site by switching from our hosting to that of another improvised provider which caused a performance degradation of this standard.

Site migrated Pingdom comparison before after

After some time, the site from a raw Apache on Plesk, they thought it was appropriate to add mod_pagespeed as a value-added technology to improve the speed of the site, and indeed the improvement was there if we consider that anyway mod_pagespeed has a all the effects of an internal Full Page Cache which in cases of extreme slowness can also significantly improve performance as we can see from the screen below, reaching just over three seconds, with an initial unfortunate situation of about double.

Lavocedeltrentino Pagespeed Pingdom

If we look at curl's answer in detail, we can see how you use mod_pagespeed on Plesk and that from a Fastweb connection on copper-mixed Fiber it has a TTFB of 1,38 seconds, when in the next screen testing a site that uses their exact same theme ( Zox News) as the courier of the city. com TTFB is just 0,2 seconds or about 7 times faster.

If we also consider the TTFB measured at European level by Speed ​​Vitals, let's see in even more detail how mod_pagespeed really sucks in terms of performance going to embarrassingly increase the TTFB with scores all marked in red, unlike those of ilcorrieredellacitta.com which are normal.

SpeedVitals TTFB Example Europe

SpeedVitals TTFB lavocedeltrentino.it
SpeedVitals TTFB citycourier.com

What to do if you are using mod_pagespeed and how to replace it?

If you are using mod_pagespeed or ngx_pagespeed, it is highly recommended to remove the extension urgently. These modules, although initially designed to improve the performance of web pages, can cause performance problems due to their obsolescence and new Google guidelines.

The main reason for removing these extensions is that many of the optimization operations done by mod_pagespeed or ngx_pagespeed can be done more effectively and more granularly at the application level, for example through the use of dedicated plugins such as W3 Total Cache, Autoptimize, Wp Rocket or combinations of these tools if we are dealing with a WordPress installation.

For example, JS optimization, minification, compression, critical css, unused code removal and webp image delivery can be done in a more precise and customizable way through the use of these plugins.

Removing mod_pagespeed or ngx_pagespeed from your server, and using these plugins to optimize web page performance, will allow you to adapt to current Google guidelines and gain more precise and granular control over optimizing the performance of your web pages.

 

Do you have doubts? Don't know where to start? Contact us!

We have all the answers to your questions to help you make the right choice.

Chat with us

Chat directly with our presales support.

0256569681

Contact us by phone during office hours 9:30 - 19:30

Contact us online

Open a request directly in the contact area.

INFORMATION

Managed Server Srl is a leading Italian player in providing advanced GNU/Linux system solutions oriented towards high performance. With a low-cost and predictable subscription model, we ensure that our customers have access to advanced technologies in hosting, dedicated servers and cloud services. In addition to this, we offer systems consultancy on Linux systems and specialized maintenance in DBMS, IT Security, Cloud and much more. We stand out for our expertise in hosting leading Open Source CMS such as WordPress, WooCommerce, Drupal, Prestashop, Joomla, OpenCart and Magento, supported by a high-level support and consultancy service suitable for Public Administration, SMEs and any size.

Red Hat, Inc. owns the rights to Red Hat®, RHEL®, RedHat Linux®, and CentOS®; AlmaLinux™ is a trademark of AlmaLinux OS Foundation; Rocky Linux® is a registered trademark of the Rocky Linux Foundation; SUSE® is a registered trademark of SUSE LLC; Canonical Ltd. owns the rights to Ubuntu®; Software in the Public Interest, Inc. holds the rights to Debian®; Linus Torvalds holds the rights to Linux®; FreeBSD® is a registered trademark of The FreeBSD Foundation; NetBSD® is a registered trademark of The NetBSD Foundation; OpenBSD® is a registered trademark of Theo de Raadt. Oracle Corporation owns the rights to Oracle®, MySQL®, and MyRocks®; Percona® is a registered trademark of Percona LLC; MariaDB® is a registered trademark of MariaDB Corporation Ab; REDIS® is a registered trademark of Redis Labs Ltd. F5 Networks, Inc. owns the rights to NGINX® and NGINX Plus®; Varnish® is a registered trademark of Varnish Software AB. Adobe Inc. holds the rights to Magento®; PrestaShop® is a registered trademark of PrestaShop SA; OpenCart® is a registered trademark of OpenCart Limited. Automattic Inc. owns the rights to WordPress®, WooCommerce®, and JetPack®; Open Source Matters, Inc. owns the rights to Joomla®; Dries Buytaert holds the rights to Drupal®. Amazon Web Services, Inc. holds the rights to AWS®; Google LLC holds the rights to Google Cloud™ and Chrome™; Microsoft Corporation holds the rights to Microsoft®, Azure®, and Internet Explorer®; Mozilla Foundation owns the rights to Firefox®. Apache® is a registered trademark of The Apache Software Foundation; PHP® is a registered trademark of the PHP Group. CloudFlare® is a registered trademark of Cloudflare, Inc.; NETSCOUT® is a registered trademark of NETSCOUT Systems Inc.; ElasticSearch®, LogStash®, and Kibana® are registered trademarks of Elastic NV Hetzner Online GmbH owns the rights to Hetzner®; OVHcloud is a registered trademark of OVH Groupe SAS; cPanel®, LLC owns the rights to cPanel®; Plesk® is a registered trademark of Plesk International GmbH; Facebook, Inc. owns the rights to Facebook®. This site is not affiliated, sponsored or otherwise associated with any of the entities mentioned above and does not represent any of these entities in any way. All rights to the brands and product names mentioned are the property of their respective copyright holders. Any other trademarks mentioned belong to their registrants. MANAGED SERVER® is a trademark registered at European level by MANAGED SERVER SRL, Via Enzo Ferrari, 9, 62012 Civitanova Marche (MC), Italy.

JUST A MOMENT !

Would you like to see how your WooCommerce runs on our systems without having to migrate anything? 

Enter the address of your WooCommerce site and you will get a navigable demonstration, without having to do absolutely anything and completely free.

No thanks, my customers prefer the slow site.
Back to top