PageSpeed 优化库
PageSpeed Optimization 库是一组 C++ 类,可使用独立于服务器的框架自动优化它们使用的网页和资源。这些库是开源的,欢迎任何社区贡献!
使用 API 的三个步骤
安装
使用 PSOL 的第一步是从源代码构建 mod_pagespeed。
请注意,以上代码将构建 Apache 模块
使用 Apache 或 PSOL 模块,或使用我们的示例应用。
PSOL 采用的构建系统目前存在一些局限性,
必须先编译 mod_pagespeed。
相关说明可在 mod_pagespeed Wiki 上的页面中找到。
HowToBuild。
完成该步骤后,输入以下命令:
cd INSTALL_DIR/src/pagespeed/automatic
make all
这将在
pagespeed_automatic.a
当前目录中。
使用示例应用作为参考
mod_pagespeed 来源有一个目录,其中包含与 PageSpeed 优化的简单集成
库。请在该文件中查看 Makefile、主类和主程序。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-11。
[null,null,["最后更新时间 (UTC):2024-10-11。"],[[["PageSpeed Optimization Libraries (PSOL) are C++ classes that automatically optimize web pages and resources, independent of the server."],["PSOL is open-source and welcomes community contributions."],["To use PSOL, you need to build mod_pagespeed, then build the PSOL library using provided instructions."],["A sample application and API documentation are available to guide integration and usage."]]],["PageSpeed Optimization Libraries (PSOL) optimize web pages using a server-independent framework. To use PSOL, first build mod_pagespeed from source, which generates `pagespeed_automatic.a`. Then, navigate to the `INSTALL_DIR/src/pagespeed/automatic` directory and execute `make all`. The sample application in the mod_pagespeed source directory provides examples in the Makefile, main class, and main program. Finally, the API documentation offers class library information. Community contributions to the open-source libraries are encouraged.\n"]]