I’m seeing an odd behavior connecting to a development webserver running on my local machine.
When I connect to http://192.168.1.14 (my ip) everything loads fast (sub 200ms for a page + 20 resources, an expected result).
When I connect to http://localhost I get 5 second load times for the same page and what I see when I profile the page using Chrome is:
- 1st page, ~1 sec connection time (varies from 0.98 to 1.02), then loads fast
- The next 3 resources have a ~1 sec connection time then load fast.
- The next 6 then wait ~1 sec connection time (after the last group loaded) then load fast.
- This pattern repeats its self in batches of 6 resources until everything is loaded.
Any ideas on this? Where could the 1 sec connection time delay be coming from?
I’m referencing “Connection Time” from the resource profile graph provided in the Google Chrome Developer Tools. For example, one resource shows:
Proxy: 0ms
DNS Lookup: 1ms
Connecting: 1.00s
Sending: 0ms
Waiting: 3ms
Receiving: 2ms
I had a similar problem recently.
The problem was that I had configured a proxy server in Windows’ proxy settings and every request went through the proxy even though I had explicitly enabled the option “Bypass proxy server for local addresses”. Apparently this setting was not working or didn’t do what I expected.
So I went ahead and configured an exception for
localhostin the advanced proxy settings. Now everything from my development server loads pretty fast.