Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browser scrolls to the bottom of the page automatically on load in Localhost

This is the most strange problem I've ever seen. I'm using Visual Studio Enterprise 2015 Version 14.0.25425.01 Update 3 and developing .NET web applications. Today when I lunched one of web applications, after page loads completely, suddenly it scrolled down to the bottom. First I thought it may be a javascript function or something, but it wasn't. It works without problem on hosted server but in local host this problem exists.

The diagnosis steps I've tried are as below and nothing else comes to my mind.

1) I asked my colleague to get my version from TFS and run it, the project works great without problem on his machine.

2) I republished my version and uploaded to Host, it works great on the Host.

3) I commented all css and js files, reset Chrome cache and tried again, no luck!

4) I downloaded and installed Mozilla Firefox, the problem exists yet.

5) I restarted IIS Express and rebooted my laptop, wasn't helpful.

6) I opened another solution and ran it, and strangely the problem exists on other projects too!!!!

7) I tried changing the project port and it didn't help.

8) I tried to create a new page, without MasterPage and it had no problem.

9) When I add a Button or Anchor element to the page, the browser scrolls down to that element but a page without any active element such as anchor or button, has no problem.

10) I also tried to disable and enable Scroll-Anchoring in Chrome settings, but no help.

I'm confused, If the browser causes problem, why it works great on the Host and just problem with LocalHost? And why both FF and Chrome had the same problem? Is it possible that IIS causes such problem?!

Any Help would be appreciated.

like image 238
SalmanShariati Avatar asked Mar 07 '17 14:03

SalmanShariati


1 Answers

I've just had this and it is definitely Browser Link in my case. To disable this, you can add this setting to your web.config.

<add key="vs:EnableBrowserLink" value="false" />

As @Salman points out, this should live in the appSettings section:

<appSettings>
    <add key="vs:EnableBrowserLink" value="false" />
</appSettings>
like image 146
glosrob Avatar answered Nov 01 '22 15:11

glosrob