4

When I create an empty MVC5 project and add a controller and view, Visual Studio adds some scripts at the end of the HTML source like this:

script id="__browserLink_initializationData" type="application/json">
{"appName":"Firefox","requestId":"bbb87a70d7564b28910b9fcf0801a4c6"}
</script>
<script async="async" src="http://localhost:63975/5e85be16690c40b598a8d96a30562d1b/browserLink" type="text/javascript">
Reload the page to get source for: http://localhost:63975/5e85be16690c40b598a8d96a30562d1b/browserLink
</script>

Can anyone tell me what this is and how I can delete it?

1
  • thanks for asking , now i would definitely use that ... Commented Mar 9, 2014 at 16:03

1 Answer 1

3

Browser Link is a debugging helper in Visual Studio 2013 - the HTML is injected by an HTTP module when pages are requested. It's only enabled in debug mode (i.e. <compilation debug="true" />) - and only when running from Visual Studio.

Among other things it can synchronize navigation between different browsers and adds other debugging features that require communication between Visual Studio and the browser.

See here for more information on what it does: ASP.NET - Browser Link

You can disable it in (at least) three ways:

  • Turn debug mode off in web.config (in other words, it's automatically removed in release mode):

    <system.web>
      <compilation debug="false" targetFramework="4.5.1" />
      ...
    </system.web>
    
  • Add this to web.config to turn it off even when debug="true":

    <appSettings>
       <add key="vs:EnableBrowserLink" value="false"/>
       ...
    </appSettings>
    
  • Uncheck "Enable Browser Link" in the Browser Link dropdown menu - this is (for the moment, at least) a Visual Studio-wide setting - i.e. it will stay off for all projects until you enable it again: enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.