2

黑盒子等級瀏覽器網路問題分析工具 - Chrome/Edge NetLog

 4 weeks ago
source link: https://blog.darkthread.net/blog/chrome-netlog-dump/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Chrome/Edge NetLog-黑暗執行緒

NetLog Dump 是一個絕大部分人用不到的 Chrome/Edge 功能,其性質類似俗稱「黑盒子」的飛行記錄器。飛機的黑盒子通常會只會在空難或事故時派上用場,而查瀏覽器問題動用到 NetLog Dump,通常意味著你遇上魔王級的刁鑽茶包。

啟用 NetLog 的方法很簡單,在網址列輸入 edge://net-export/chrome://net-export/

Fig1_638477562860313600.png

一般建議選擇 Strip private information,其餘兩個選項會包含到 Cookie 或身分認證資料,處理不當可能導致機密資訊外流(當然,如果你的問題需要分析 Cookie、認證或原始傳輸資料就得啟用,請小心保管 Log 記錄)。按下「Start Logging to Disk」並選取 json 檔路徑,瀏覽器會開始記錄所有網路傳輸細節:

Fig2_638477562862013381.png

試著瀏覽網站重現問題,按下「Stop Logging」停止錄製 Log,「Show File」會顯示 json 所在資料夾。

Fig3_638477562863755666.png

要檢視 Log 內容,可開啟 https://netlog-viewer.appspot.com/#events 網頁,匯入 json 檔 (檔案只會在 瀏覽器端處理,不會上傳到網站),

Fig4_638477562865390415.png

記錄檔保留的內容超級詳細,細到封包等級,基本上可解答關於瀏覽器背後網路動作的所有疑惑。不過,你也得有相關的專業知識才能完整解讀,這些特性還真的跟黑盒子一模一樣。

Fig5_638477562867222238.png

希望大家上網順利,永遠不需要用到它。

and has 0 comments

Comments

Be the first to post a comment

Post a comment

Comment
Name Captcha

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK