Browser Link option in Visual Studio

What is browser link?

Browser Link is a feature in Visual Studio which is used to create a communication channel between the development environment and one or more browsers.

Using Browser Link, we can refresh our application in multiple browsers at a same.

We can browse our application in multiple browsers with custom/default screen size using Browser Link.

It mainly used to ensure the application correctness in the cross-browser.

How I came to know about Browser Link?

When I was debugging my web application in Visual Studio, I have noticed frequent API calls has been made with following URL pattern

http://localhost:portnumber/..../arterySignalR/poll?transport=longPolling&connectionToken=...
SignalR

When I have searched on the Internet about this, I have found details that it’s a new feature in the Visual Studio development tool.

How do Browser Link works?

Browser Link uses SignalR to create a communication channel between Visual Studio and the browser.

When Browser Link is enabled, Visual Studio acts as a SignalR server that multiple clients (browsers) can connect to.

More details about Browser Link is available here, https://docs.microsoft.com/en-us/aspnet/core/client-side/using-browserlink

Can we disable this feature?

Short Answer: Yes

I personally won’t prefer this feature to be enabled by default.

We can enable this feature whenever needed.

Steps to disable Browser Link

  1. In the Browser Link drop-down menu, uncheck Enable Browser Link.browserlink
  2. In the Web.config file, add a key named “vs:EnableBrowserLink” with the value “false” in the appSettings section.
<appSettings>
<add key="vs:EnableBrowserLink" value="false"/>
</appSettings>

3. In the Web.config file, set debug to false.


<system.web>
<compilation debug="false" targetFramework="4.5" />
</system.web>

Have a distraction-less coding session.

Happy debugging 🙂

Related article

Advertisement

One thought on “Browser Link option in Visual Studio

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s