Overall page Quality Evaluation

Source: Internet
Author: User

Phantomjs is an engine that can be used across platforms. It uses js script policies and command lines to execute webkit for page loading and statistics.

YSlow: analyzes page elements to rate and grade pages.

Pagespeed analyzes page elements, rates and recommendations for modification. (Nginx and apache have related plug-ins. At the webserver layer, these elements that affect the page speed will be processed, such as compressing the blank space and merging multiple requests)

In terms of the time, connection time, and dns resolution time of the webpage space of phantomjs itself, webkit itself supports webinspector and has various element timelines. How to integrate the data to be further studied.

Use YSlow and PhantomJS to evaluate page performance

$ Wget https://github.com/downloads/marcelduran/yslow/yslow-phantomjs-3.1.1.zip
$ Unzip yslow-phantomjs-3.1.1.zip
$ Cp yslow. js ~ /Lib/js/

$ Phantomjs ~ /Lib/js/yslow. js -- info basic "http://test.example.com"
{
"W": 146046,
"O": 84,
"U": "http % 3A % 2F % 2Ftest.example.com ",
"R": 14,
"I": "ydefault ",
"Lt": 1103
}

Overall score: B (84)
Url: http://test.example.com
# Of requests: 14
Ruleset: ydefault
Page load time: 1103

Use YSlow and PhantomJS to gather page statistics

$ Phantomjs ~ /Lib/js/yslow. js -- info stats -- format plain "http://test.example.com"

Size: 146.0 K (146046 bytes)
Overall score: B (84)
Url: http://test.example.com
# Of requests: 14
Ruleset: ydefault
Page load time: 1103
Page size (primed cache): 23.8 K (23828 bytes)
# Of requests (primed cache): 12
Statistics by component:
Doc:
# Of requests: 1
Size: 23.8 K (23828 bytes)
CSS:
# Of requests: 2
Size: 35.9 K (35967 bytes)
JS:
# Of requests: 5
Size: 79.6 K (79668 bytes)
Cssimage:
# Of requests: 3
Size: 5.0 K (5071 bytes)
Image:
# Of requests: 2
Size: 1.5 K (1512 bytes)
Favicon:
# Of requests: 1
Size: 0.0 K (0 bytes)
Statistics by component (primed cache ):
DOC:
# Of requests: 1
Size: 23.8 K (23828 bytes)
CSS:
# Of requests: 2
Size: 0.0 K (0 bytes)
JS:
# Of requests: 3
Size: 0.0 K (0 bytes)
Cssimage:
# Of requests: 3
Size: 0.0 K (0 bytes)
Image:
# Of requests: 2
Size: 0.0 K (0 bytes)
Favicon:
# Of requests: 1
Size: 0.0 K (0 bytes)

Direct command line

 npm install yslow -g yslow --info basic --format plain igvita.har    size: 67.0K (67000 bytes)    overall score: A (94)    url: http://www.igvita.com/    # of requests: 9    ruleset: ydefault    page load time: 821

Use PhantomJS and the netsniff. js to generate a HAR file

$ phantomjs ~/lib/js/netsniff.js"http://test.example.com"
> ~/tmp/example.har

Data is very limited, waiting to continue integrating inspector

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.