Wednesday 11 June 2014

Multiple requests in the browser and VS.NET's browser link

I was debugging an Web Application, looking at the client port:

model.Port = Request.ServerVariables["REMOTE_PORT"];

and on the browser I could see that this was changing everytime the page was loaded. This is a soft reload (F5), not a hard refresh (CTRL + F5). This obviously has a penalty cost, and is not in keeping with the concept of server keep alives.

So why was the port changing all the time? Firefox gives a clue:


For every page, a load of subsequent requests are being made which are incrementing the client port.
Why is this?

It's Visual Studio's browser link. It allows a communication between VS.NET and the browser and one use allows you to refresh all of the connected browsers from VS.NET with one button click. For example, you may have a tablet and a desktop connected, you make a change to the content and want to see the browsers update immediately with one click, rather than going round all the browsers individually.

It can be turned off by selecting the icon below.

No comments:

Post a Comment