문제

I am trying to automate web page performance using pagespeed.

Is there any plugin available for pagespeed to run on phantomjs

we have yslow plugin for the same and its working locally

http://yslow.org/phantomjs/

I am using the command line and then integrating the same with Jenkins for continous integration

thanks and appreciate your help

some sample code

 phantom.create (ph) ->
      ph.createPage (page) ->
        page.open "http://www.google.com", (status) ->
          console.log "opened google? ", status
          page.evaluate (-> document.title), (result) ->
            console.log 'Page title is ' + result
            ph.exit()
도움이 되었습니까?

해결책

Since PageSpeed is a C++ binary, you might want to try integrating PhantomJS netsniff.coffee (from the examples) that generates a HAR file of a given page piping the output into HAR_to_PageSpeed. Or just go with PageSpeed Insights online service.

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