This is a migrated thread and some comments may be shown as answers.

Differentiate HTTP/HTTPS traffic by browser tab?

1 Answer 25 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 09 Jul 2020, 05:23 AM

A difficult problem I am unable to overcome is separating traffic depending on which tab it's coming from. I am using Fiddler with Chrome, and this is what I'm trying to accomplish:

Lets say we have two tabs open, tab A, and tab B. I want method A to be run if there is HTTP/HTTPS traffic from tab A, and method B to run if there is HTTP/HTTPS traffic from tab B. Is there a way to distinguish between the traffic between tabs?

As a secondary question, is there a way to distinguish traffic between browsers as well? For example, separating Chrome traffic from Firefox traffic?

I have tried a lot of potential solutions. A few examples of what I've tried are: attempting to use filters, but this only blocks traffic from all other sources, except for a given table which is not the functionality that I need. I've also tried to figure out how to distinguish the two via FiddlerScript, but was unable to create anything useful. I have looked intoWebSocketMessage and Session data-structures, to no avail.

 

Is there a way to solve either of my two problems?

1 Answer, 1 is accepted

Sort by
0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 09 Jul 2020, 07:58 PM

Hi John,

It is possible to view the Process ID from a specific session in FiddlerScript and switch on that. This could be used to distinguish the browser. See the below code snippet for checking the browser process and logging some output. 

if(oSession.LocalProcess.Split(':')[0] == "chrome")
{
	FiddlerApplication.Log.LogString("Chrome Browser");
} else if(oSession.LocalProcess.Split(':')[0] == "firefox")
{
	FiddlerApplication.Log.LogString("Firefox Browser");
}

Unfortunately, there isn't a way to distinguish between the different tabs unless something about the requests were identifiable. This is because the tab structure is unknown to Fiddler  and only information related to the request could be used. For example, host names, headers, etc.  

Please let me know the Process ID option works for you. Thank you for using the Fiddler Forums.

Regards,


Eric R | Senior Technical Support Engineer
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Fiddler Classic
Asked by
John
Top achievements
Rank 1
Answers by
Eric R | Senior Technical Support Engineer
Telerik team
Share this question
or