Any way to automate YSlow? Or an alternative which has an API?
Is there a way to automate YSlow or use it programmatically? I don't have enough knowledge to write my own Firefox extension to tap into YSlow.
There's a similar question but it's over a year old and I wanted to know if anything new came out since.
www.webpagetest.org looks开发者_StackOverflow promising. I am looking for more alternatives.
Try http://www.showslow.com/. You can also download it from github and install it on your own server.
You could try Google's PageSpeed Insights API.
How to use it :
- Get your free API key from the developer console
- Make a GET request to
https://www.googleapis.com/pagespeedonline/v1/runPagespeed?url={THE_URL_TO_CHECK}&key={YOUR_API_KEY}
What you probably want is the GTmetrix service. It's excellent and it's free. You can't program it yourself, but it'll monitor your sites for you automatically, and that's really all you need.
The actual loading speeds are treacherous and unreliable. They are highly dependent on your browser choice, network activity, geographical location, local memory use, etc. You should never use loading speeds for optimization. Optimize for YSlow and Page Speed scores only.
You could use YSlow for PhantomJS.
精彩评论