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
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
- In the Browser Link drop-down 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 🙂