This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15999|Reply: 0

[ASP.NET] Turn off the Browser Link feature in Visual Studio 2013

[Copy link]
Posted on 5/24/2016 4:27:05 PM | | | |
<!-- Visual Studio Browser Link -->
<scrip{filter}t type="application/json" id="__browserLink_initializationData">
    {"appName":"Chrome","requestId":"c1d966c4e30a4503926d28e76b7bc5be"}
</scrip{filter}t>
<scrip{filter}t type="text/javascrip{filter}t" src="http://localhost:33888/4162501dbbc24a0fb1ec87e6027ba41e/browserLink" async="async"></scrip{filter}t>
<!-- End Browser Link -->




Today I wrote a project, and I used a Pace.js page progress loading plugin in the project, and found that the page loading progress bar was very slow and always did not load.

Finally, find the reason, why? I found a few more lines of door-to-door code in the source code, what the hell? ?

What is Browser Link?

The function of this Browser Link is to build a communication bridge between the flow and the Visual Studio IDE through a script file, and after enabling Browser Link, Visual Studio will inject an IHttpModule module object into the website, and then register a script on each page.

The Browser Link feature is implemented using SignalR technology.

With all that said, what exactly is the Browser Link function used for?

Now the Broswer Link function is relatively simple, it is used to refresh the page that has been opened in the browser in the Visual Studio IDE, why refresh the page in the Visual Studio IDE?

If you are developing a page that needs to be compatible with IE, GOOGLE, FIREFOX and mobile browsers, you may use these flowers to open your page at the same time, if you find some kind of problem, go back to VS IDE to modify it, and after the modification, you can click "Refresh Linked Browsers" in the Visual Studio IDE to refresh all browsers to see the effect.

Now this "Browser Link" only has such a refresh function, but the Browser Link function can be written as an extension function, and you can customize some of the functions you need.

If you don't want to use this feature, just add the following code under the appSettings node in web.config.


<appSettings>
    <add key="webpages:Version" value="2.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="PreserveLoginUrl" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavascrip{filter}tEnabled" value="true" />
    <add key="vs:EnableBrowserLink" value="false"/>
  </appSettings>


The red one is to be added, and finally, it is perfectly solved!!




Previous:【Original】Ali Big Fish Batch Group SMS.net C# Personal Version
Next:The Bootstrap modal dialog reloads every time
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com