문제

As title, is there any way to host google pagespeed insights on my own server instead of using google api to run a test?

Thanks

도움이 되었습니까?

해결책

Yes, but with a few caveats.

First off, the core of PageSpeed is open-source, and so are the browser extensions (Chrome, FF), which provide built-in optimization recommendations. Given the projects above, you already have all the necessary code available to run it yourself.

PageSpeed also ships with a har_to_pagespeed tool, which you can use to to generate a list of recommendations. Check out this blog post from Steve Souders. Link to his online tool.

To generate a har file you'll need a separate process / browser driver - there are a few open-source tools available that can do this. Check out phantom.js.

Finally, the above has a small caveat. har_to_pagespeed won't give you the exact same results as a browser extension, because the browser extensions analyze the DOM as well and make some recommendations based on that. This data is not available within the HAR format.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top