سؤال

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