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

Heads up: Blog posts on Elasticsearch 5.x

It’s already too late. I’m curious about experimenting the latest features that released in Elasticsearch 5.x release.

Here and there I’ve started reading about the breaking changes of Elasticsearch 5.x from the start of its release.

Finally, I have planned to spend some quality time to experiment the latest & exciting features of Elasticsearch.

So, Once I have done with my experiments I’ve decided to write up few blog post from beginner to intermediate level.

Alert: Posts on topic “Elasticsearch 5.x” are coming soon!

Happy learning!