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