Firefox 瀏覽器附加元件
  • 擴充套件
  • 佈景主題
    • 用於 Firefox
    • 字典與語言套件
    • 其他瀏覽器網站
    • Android 版的附加元件
登入
Diff HTTP 預覽

Diff HTTP 作者: limkokhole

Diff the network traffic in real-time to observe the URLs variant over time.

3.7 (3 reviews)3.7 (3 reviews)
30 Users30 Users
必須使用 Firefox 才能使用此擴充套件
下載 Firefox 並安裝擴充套件
下載檔案

擴充套件後設資料

畫面擷圖
Diff collected HTTP URL in real-time. It will diff current URL with previous CLOSEST MATCH url. As you can see in the screenshot, it will get the closest variant to diff video only with video, instead of video with audio in YouTube.The sequence number "&seq=" keep increase in constant on Facebook. But then only "&cb=" always changed while "&seq=" not always increase. This extension unveil the hidden rule of complicated urls  in  instant.Click Post data or Headers cell or question marks (under URL expanded) to open windows to view the diff.Support "Clear", "Pause", "All tabs", "Diff only if host same", and also include data URL buttons. 

Also Status, Method, Post data, human-readable time, sent headers, and received headers columns.

Since "Recv headers" on [Prev] URL may not receive yet before shows [Curr] header, so special tag called "[Wait]" and "[Waited]" which may marked on "Recv Headers" column.[New] indicated this URL on its first appearance. And [Same] indicated the URL is duplicated with previous CLOSEST MATCH URL after diff.  Same URL doesn't means Post data or headers is same.data:image will shows If clicked include data URL button, but not recommend to use on daily basics since it required more processing resources.Hover on [Prev] or [Curr] title to see its URL tool-tip on popup window..
關於此擴充套件
Diff the network traffic in real-time to observe the urls variant over time.


Click here to play demonstration video v3.0 in YouTube


How to use:
After installed, right-click on webpage to open context menu and choose "Inspect Element". After inspector done loading, click the "Diff HTTP" tab. Navigate/Refresh the webpage to capture and diff network traffic in real-time.


Brief:
This extension capture network traffic in developer tools Diff HTTP tab, and then diff the current entry (URL/Post data/Sent Headers/Received Headers) with the previous CLOSEST MATCH entries if meet “The Rules”. The first entry will always marked as [New] since no previous entry. The second entry and the following may mark as any of [New]/[Diff]/[Same] after it meets the rule and diff.

Note that the Post data and headers are choosen depends on it’s URL.

Post data column: Mark as [None] if no compare AND curr no post data. Mark as [Same] if both(curr/prev) has same (no [None]) post data. Mark as [Same] plus underline with black padding if both(curr/prev) has [None] post data.

Mark as [Wait] in "Recv Headers" if prev URL's "Recv Headers" still empty, it may updated to [Waited:Diff|Same] later after received prev "Recv Headers".


Something is broken ?
1. Currently no support on Private Window.

2. The panel will shows blank if you click the “Diff HTTP” tab before “Inspector” tab loading done, bug report at https://bugzilla.mozilla.org/show_bug.cgi?id=1424515

3. You may need to upgrade your firefox to latest version if panel doesn’t capture anything.

4. Change panel black theme to white by navigate: about:config -> devtools.theme -> double-click the "dark" Value and edit it to "white".


Logic behind the scene:
Everytime the URL captured insert to the table, the internal all entries list will be sort right away. Due to the list is always has been sorted:
[1] It only need to do binary sort when insert new single entry.
[2] It can quickly picks 2 siblings of current entry which consider as 2 CLOSEST MATCH.

Then it will try to calculate the diff count for both siblings, and try to pick the least count of diff which is the 1st CLOSEST MATCH. If it did match “The Rules” below, then it will choosen to diff with the current entry. If the 1st CLOSEST MATCH sibling doesn’t match “The Rules”, then it will try the 2nd CLOSEST MATCH to test the “The Rules”. If both sibling failed to pass the test of “The Rules”, then it will give up and mark current entry as [New].


The Rules:
The url https://mozilla.org/video/foo/hi?q=1 will compare with https://mozilla.org/video/foo/hello?q=1 since the protocol://path1/path2/(except last path) are same, i.e. both have the same prefix https://mozilla.org/video/foo

The url https://mozilla.org/video/foo/hi?q=1 will NOT compare with https://mozilla.org/video/bar/hello?q=1 since the middle path /foo and /bar are different.

The url https://mozilla.org/video/foo/hi?q=1 will NOT compare with https://mozilla.com/video/foo/hello?q=1 since both hosts are different, i.e. https://mozilla.org not equal to https://mozilla.com.

The reasons how this rules has been choosen is because of the valuable comparison of query string/headers between 2 URLs most likely target on filename/last path with the same host and middle path. You can imaging that youtube.com/video/a.mp4 shouldn’t diff with youtube.com/audio/b.m4a, instead youtube.com/video/a.mp4 should diff with youtube.com/video/b.mp4 as possible. But I added a tick button called ‘Diff only if host same’ (i.e. as long as both hosts are same) to allow youtube.com/video/a.mp4 and youtube.com/audio/b.m4a to diff. If compare google.com with facebook.com, it doesn’t useful in most cases since their difference is big, so no support to diff different hosts.


Some Features:
  1. Click the [Diff] URL entry to reveals the current and previous entry URL. You can copy the URLs by click to select and Ctrl+C.
  2. Click the [Diff/Same/New/] URL entries to expands if not enough space of height.
  3. Click the Post data and headers entries to open new window to show the [prev][diff][current] side by side comparison.
  4. Hover the top bar buttons to popup functionality tooltip.
  5. Status other than 200 and Method other than GET will highlight as bold for easier to spot on.
  6. Click "Diff" button to manually diff the text you want, or direct edit the fields on popup window then click "Diff" button to diff.
  7. Tick "All Tabs" checkbox to combine all tabs traffic. It also useful to see traffic if certain site block inspector.

Todo:
You might noticed the above rules are not yet perfect, it's not time-awareness for same URL pattern, i.e. the multiple same pattern of previous URL get chosen without order by time. I already has solution to solve this but no time to complete it.

Troubleshoot:
You should visits Add-ons settings page at about:addons , then select "Check for Updates" or "Update Add-ons automatically" to get latest patch.

Privacy Concerns:
No data send to external ip, all data diff in web browser side only. This Firefox extension is zip and plain text, Mozilla staff and everyone can review my code and report abuse to Mozilla if something went wrong.

Thanks, and feel free to buy me a coffee :p - https://www.paypal.me/limkokhole
展開後 閱讀更多
由 1 位評論者給出 3.7 分
登入後即可幫此擴充套件評分
目前沒有評分

已儲存星等

5
2
4
0
3
0
2
0
1
1
閱讀全部 3 條評論
權限與資料了解更多

必要權限:

  • 存取您所有網站中的資料
更多資訊
附加元件網址
  • 首頁
  • 技術支援網站
  • 技術支援信箱
版本
3.5
大小
73.21 KB
最近更新
6 年前 (2020年1月21日)
相關分類
  • 網頁開發
  • 其它
授權條款
Mozilla Public License 2.0
版本紀錄
  • 瀏覽所有版本
新增至收藏集
檢舉此附加元件
支援這位開發者

這套擴充套件的開發者希望您透過小小的捐獻協助其後續開發。

立刻捐款

3.5 版的發行公告
Recent versions of Firefox break my extension which not expand url when click on truncated long url. (Can test in YouTube stream url).
其他知名擴充套件
  • Dark Reader

    Dark Reader
    推薦項目推薦項目

    評價 4.5 分,滿分 5 分

    Dark Reader Ltd

    1,227,748 位使用者

  • Grammar and Spell Checker - LanguageTool

    Grammar and Spell Checker - LanguageTool
    推薦項目推薦項目

    評價 4.7 分,滿分 5 分

    LanguageTooler GmbH

    363,095 位使用者

  • Search by Image

    Search by Image
    推薦項目推薦項目

    評價 4.6 分,滿分 5 分

    Armin Sebastian

    406,268 位使用者

  • Tree Style Tab

    Tree Style Tab
    推薦項目推薦項目

    評價 4.5 分,滿分 5 分

    Piro (piro_or)

    178,403 位使用者

limkokhole 製作的更多擴充套件
  • Enable Selection

    Enable Selection

    評價 4 分,滿分 5 分

    limkokhole

    931 位使用者

  • Google Search - Must Include

    Google Search - Must Include

    評價 4 分,滿分 5 分

    limkokhole

    15 位使用者

  • Unlock zhihu

    Unlock zhihu

    目前沒有評分

    limkokhole

    3 位使用者

  • Chatgpt "Save page as..." Fix

    Chatgpt "Save page as..." Fix

    目前沒有評分

    limkokhole

    1 位使用者

  • Quora Select Answers

    Quora Select Answers

    目前沒有評分

    limkokhole

    0 位使用者

前往 Mozilla 官網

附加元件

  • 關於
  • Firefox 附加元件部落格
  • 擴充套件工作坊
  • 開發者交流中心
  • 開發者政策
  • 社群部落格
  • 討論區
  • 回報 Bug
  • 評論撰寫指南

瀏覽器

  • Desktop
  • Mobile
  • Enterprise

產品

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • 隱私權
  • Cookie
  • 法律資訊

除另有註明外,本站內容皆採用創用 CC 姓名標示—相同方式分享條款 3.0 或更新版本授權大眾使用。