Thursday, July 23, 2015

Wireshark can be a lie detector


   I used to trust Google Chrome browser and think it will never lie.  Today's experience changed my perception.

   I am testing an application with a web component.  When I clicked on a button, it felt the page is a little slow, so I opened the Chrome developer console.  It showed that downloading the content (in the JSON format) took 3 seconds.  I tried it a couple of times and it's always about 3 seconds.


     This worried me since I really don't expect it to take that long!  So I opened my wireshark to monitor the traffic between my browser and the web server.   To my surprise, the entire HTTP response completed within 1.08 seconds.



    I am using Google Chrome "Version 40.0.2214.111 (64-bit)" on my Ubuntu 12.04 PC.

    So I fired Firefox and ran the same test, it shows about 1.08 seconds which is very consistent with my wireshark reading:



    We all heard the famous quote "Trust but verify",  it's more true when it comes to browser.  Don't forget wireshark when you try to "verify"!

No comments:

Post a Comment