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 the our application in multiple browser at a same. We can browser our application in multiple browsers with custom/default screen size using Browser Link. Its mainly used to ensure the application correctness in 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
When I have searched in Internet about this, I have found details that it’s a new feature in the Visual Studio development tool.
How does 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
- In the Browser Link dropdown menu, uncheck Enable Browser Link.
- 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 🙂