PageSpeed 优化库
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
PageSpeed 优化库是一组 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、main 类和主程序。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-01。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]