Skip to content

pagespeed: PageSpeed dynamic module for NGINX

Installation

CentOS/RHEL/RockyLinux/etc. and Amazon Linux are supported and require a subscription.

Fedora Linux is supported free of charge and doesn't require a subscription.

OS-specific complete installation and configuration guides available:

Other supported operating systems

yum -y install https://extras.getpagespeed.com/release-latest.rpm
yum -y install nginx-module-pagespeed

Enable the module by adding the following at the top of /etc/nginx/nginx.conf:

load_module modules/ngx_pagespeed.so;

This document describes nginx-module-pagespeed v1.13.35.2 released on Feb 05 2018.


ngx_pagespeed

ngx_pagespeed speeds up your site and reduces page load time by automatically applying web performance best practices to pages and associated assets (CSS, JavaScript, images) without requiring you to modify your existing content or workflow. Features include:

  • Image optimization: stripping meta-data, dynamic resizing, recompression
  • CSS & JavaScript minification, concatenation, inlining, and outlining
  • Small resource inlining
  • Deferring image and JavaScript loading
  • HTML rewriting
  • Cache lifetime extension
  • and more

To see ngx_pagespeed in action, with example pages for each of the optimizations, see our demonstration site.

How to use

Follow the steps on PageSpeed configuration.

For feedback, questions, and to follow the progress of the project:

GitHub

You may find additional configuration tips and documentation for this module in the GitHub repository for nginx-module-pagespeed.