日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

网页延迟分析

發(fā)布時間:2024/4/14 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 网页延迟分析 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

一。工具

  • chrome插件:page speed insight 自動分析插件

  • 2.chrome工具:chrome > more tool >檢測設(shè)備> inspect(需要代理)> network

    3.優(yōu)化建議:http://bystep.duapp.com/drip/yahoo35.html#/

    m.babytree.com/ask

    4.chrome官方說明:https://developer.chrome.com/devtools/docs/network#resource-network-timing


    二。說明

    1.DNS lookup:域名解析時間

    DNS(Domain Name System,域名系統(tǒng)),因特網(wǎng)上作為域名和IP地址相互映射的一個分布式數(shù)據(jù)庫,能夠使用戶更方便的訪問互聯(lián)網(wǎng),而不用去記住能夠被機(jī)器直接讀取的IP數(shù)串。通過主機(jī)名,最終得到該主機(jī)名對應(yīng)的IP地址的過程叫做域名解析(或主機(jī)名解析)。


    2.stalled

    • Stalled是瀏覽器得到要發(fā)出這個請求的指令,到請求可以發(fā)出的等待時間,一般是代理協(xié)商、以及等待可復(fù)用的TCP連接釋放的時間,不包括DNS查詢、建立TCP連接等時間等


    3.request sent

    • Request sent?請求第一個字節(jié)發(fā)出前到最后一個字節(jié)發(fā)出后的時間,也就是上傳時間



    4.waiting

    • Waiting?請求發(fā)出后,到收到響應(yīng)的第一個字節(jié)所花費(fèi)的時間(Time To First Byte)



    Stalled/Blocking

    Time the request spent waiting before it could be sent. This time is
    inclusive of any time spent in proxy negotiation. Additionally, this?time will include when the browser is waiting for an already
    established connection to become available for re-use, obeying?Chrome's maximum six TCP connection per origin rule.

    Proxy Negotiation

    Time spent negotiating with a proxy server connection.

    DNS Lookup

    Time spent performing the DNS lookup. Every new domain on a page
    requires a full roundtrip to do the DNS lookup.

    Initial Connection / Connecting

    Time it took to establish a connection, including TCP
    handshakes/retries and negotiating a SSL.


    TCP:當(dāng)應(yīng)用層向TCP層發(fā)送用于網(wǎng)間傳輸?shù)摹⒂?位字節(jié)表示的數(shù)據(jù)流,TCP則把數(shù)據(jù)流分割成適當(dāng)長度的報文段,最大傳輸段大小(MSS)通常受該計算機(jī)連接的網(wǎng)絡(luò)的數(shù)據(jù)鏈路層的最大傳送單元(MTU)限制。之后TCP把數(shù)據(jù)包傳給IP層,由它來通過網(wǎng)絡(luò)將包傳送給接收端實(shí)體的TCP層。

    TCP為了保證報文傳輸?shù)目煽?span style="margin-left:2px;color:rgb(51,102,204);vertical-align:baseline;">[1]?,就給每個包一個序號,同時序號也保證了傳送到接收端實(shí)體的包的按序接收。然后接收端實(shí)體對已成功收到的字節(jié)發(fā)回一個相應(yīng)的確認(rèn)(ACK);如果發(fā)送端實(shí)體在合理的往返時延(RTT)內(nèi)未收到確認(rèn),那么對應(yīng)的數(shù)據(jù)(假設(shè)丟失了)將會被重傳。

    • 在數(shù)據(jù)正確性與合法性上,TCP用一個校驗(yàn)和函數(shù)來檢驗(yàn)數(shù)據(jù)是否有錯誤,在發(fā)送和接收時都要計算校驗(yàn)和;同時可以使用md5認(rèn)證對數(shù)據(jù)進(jìn)行加密。

    • 在保證可靠性上,采用超時重傳和捎帶確認(rèn)機(jī)制。

    • 在流量控制上,采用滑動窗口協(xié)議,協(xié)議中規(guī)定,對于窗口內(nèi)未經(jīng)確認(rèn)的分組需要重傳。

    在擁塞控制上,采用廣受好評的TCP擁塞控制算法(也稱AIMD算法)。該算法主要包括三個主要部分:1)加性增、乘性減;2)慢啟動;3)對超時事件做出反應(yīng)。


    Secure Socket Layer:為Netscape所研發(fā),用以保障在Internet上數(shù)據(jù)傳輸之安全,利用數(shù)據(jù)加密(Encryption)技術(shù),可確保數(shù)據(jù)在網(wǎng)絡(luò)上之傳輸過程中不會被截取及竊聽。一般通用之規(guī)格為40 bit之安全標(biāo)準(zhǔn),美國則已推出128 bit之更高安全標(biāo)準(zhǔn),但限制出境。只要3.0版本以上之I.E.或Netscape瀏覽器即可支持SSL。

    當(dāng)前版本為3.0。它已被廣泛地用于Web瀏覽器與服務(wù)器之間的身份認(rèn)證和加密數(shù)據(jù)傳輸。

    SSL協(xié)議位于TCP/IP協(xié)議與各種應(yīng)用層協(xié)議之間,為數(shù)據(jù)通訊提供安全支持。SSL協(xié)議可分為兩層: SSL記錄協(xié)議(SSL Record Protocol):它建立在可靠的傳輸協(xié)議(如TCP)之上,為高層協(xié)議提供數(shù)據(jù)封裝、壓縮、加密等基本功能的支持。 SSL握手協(xié)議(SSL Handshake Protocol):它建立在SSL記錄協(xié)議之上,用于在實(shí)際的數(shù)據(jù)傳輸開始前,通訊雙方進(jìn)行身份認(rèn)證、協(xié)商加密算法、交換加密密鑰等。



    SSL

    Time spent completing a SSL handshake.

    Request Sent / Sending

    Time spent issuing the network request. Typically a fraction of a
    millisecond.

    Waiting (TTFB)

    Time spent waiting for the initial response, also known as the Time To
    First Byte. This time captures the latency of a round trip to the?server in addition to the time spent waiting for the server to deliver
    the response.

    Content Download / Downloading

    Time spent receiving the response data.



    The waterfall indicates when the the?DOMContentLoadedand?load?events were fired with blue and red vertical lines, respectively. The?DOMContentLoaded?event is fired when the main document had been loaded and parsed. The?load?event is fired when all of the page's resources have been downloaded.


    The waterfall view in the Network panel graphs the time it took to load each resource, from the start of the HTTP request to the receipt of the final byte of the response. Each resource loading time is represented as a bar, color-coded according to the resource type. The length of the lighter-shaded part of each bar represents the request's latency, while the length of the darker-shaded part represents the time spent receiving the?


    The waterfall view in the Network panel graphs the time it took to load each resource, from the start of the HTTP request to the receipt of the final byte of the response. Each resource loading time is represented as a bar, color-coded according to the resource type. The length of the lighter-shaded part of each bar represents the request's latency, while the length of the darker-shaded part represents the time spent receiving the?


    三。建議


  • 減少HTTP請求

    合并圖片,js,css(如果不沖突)

  • 減少dns查詢時間




  • dns的時間遠(yuǎn)大于下載時間。

    waiting是等待服務(wù)器的時間。




    轉(zhuǎn)載于:https://blog.51cto.com/bysowhat/1607044

    總結(jié)

    以上是生活随笔為你收集整理的网页延迟分析的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。