开发者

Is there an equivalent of pagespeed for Nginx?

开发者 https://www.devze.com 2023-03-29 02:30 出处:网络
I know the pagespeed module for Apache can make the page v开发者_开发问答isit faster, so, I wonder whether there is an equivalent for Nginx?

I know the pagespeed module for Apache can make the page v开发者_开发问答isit faster, so, I wonder whether there is an equivalent for Nginx?

Thanks in advance!


https://github.com/pagespeed/ngx_pagespeed

it is a work-in-progress source, http://news.ycombinator.com/item?id=4638712

igrigorik | http://news.ycombinator.com/item?id=4638885
Mostly just hooking up all the API's - aka, "making it work", and making it work in the context of nginx. As a reference point, the Apache implementation took a while to get right even just because understanding all of the gotchas of Apache's worker model and surrounding API's took time - half a dozen false starts, etc. Now it's solid. If someone has good understanding of nginx internals, then any input, guidance, etc, would be awesome, as it would short circuit a lot of that extra work. We have a design doc in progress, I'll work on making it public and will share it in the project readme. In the meantime, if you have any suggestions, open an issue on the repo and let us know!

Edit: https://github.com/pagespeed/ngx_pagespeed is now out of beta.


There's the start of a port over to nginx here - https://github.com/mtourne/ngx_instaweb

Even if the port isn't ready for prime time you can always perform the optimisations by hand.

  • Turn on compression
  • Reduce HTTP requests
    • merge + minify CSS
    • merge + minify JS
  • Serve static content with long expiry times
  • Optimise images
  • etc

One of the things that pagespeed etc can't do yet is workout what JS is needed during pageload and what can be loaded later.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号