PageSpeed Module是一个HTTP的动态扩展模块,可以用在Apache(mod_pagespeed)和Nginx(ngx_pagespeed)上编译使用,能够显著的改进网站页面加载速度,优化用户对网站的体验。
具体细节请参考PageSpeed Module官方站点
主要特点:
自动对页面资源进行优化
最新的web优化技术
40+ 优化/过滤配置参数
免费,开源,版本持续更新中
可以部署到个人站点和主机提供商,CDN厂商等等。
PageSpeed Module 采用了一些流行的web/http优化技术提升页面加载速度,如对CSS,JavaScript,Image,DNS的优化等等,具体细节如下:
- Collapse Whitespace: reduce bandwidth usage by replacing multiple contiguous whitespace in HTML pages with a single whitespace.
- Canonicalize JavaScript Libraries: reduce bandwidth usage by automatically replacing popular JavaScript libraries with ones hosted for free (e.g., by Google).
- Combine CSS: reduce the number of HTTP requests by combining multiple CSS files into one.
- Combine JavaScript: reduce the number of HTTP requests by combining multiple JavaSript files into one.
- Elide Attributes: reduce document size by removing tags specified with default attributes.
- Extend Cache: reduce bandwidth usage by optimizing cacheability of web pages’ resources.
- Flatten CSS Imports: reduce the number of HTTP request round-trips by removing @import in CSS files.
- Lazyload Images: delay the loading of images which are not visible on the client’ browser.
- Minify JavaScript: reduce bandwidth usage by minifying JavaScript.
- Optimize Images: optimize image delivery by introducing more inline images, compressing images, or converting GIF to PNG.
- Pre-Resolve DNS: reduce DNS resolution time by pre-resolve DNS.
- Prioritize Critical CSS: rewrite CSS files to load page-rendering CSS rules first.
PageSpeed Module用户使用情况:
大约350,000+ 优化过的站点
主机提供商和 CDN厂商,如:
Edgecast,Dreamhost,Go Daddy,SiteGroud等等。