views:

154

answers:

2

I'm running this out of the VS 2008 debugger on Windows 7, running .Net 3.5.

The idea was to make all ajax requests with jQuery only, rather than .net, following some tutorials online.

Default.aspx -> HTML page, jquery triggers method in Default.aspx.cs

http://pastebin.com/pxBvKA2H

Default.aspx.cs -> C# Webform, just defines a GetDate fuction, which only returns a string for now (trying to eliminate any possible issues)

(can only post one hyperlink...) pastebin.com/pnHn50hu

The ajax query takes longer than it should. Profiling with firebug revealed that it took 1.03 ms.

1s DNS Lookup | 26ms Waiting | 1ms Receiving

EDIT: It continues to take the same set of times if you continue to click and resubmit the request.

Is there anything I can do to cut down on the DNS Lookup time / what did I do wrong?

Thanks for any help.

A: 

After you get site running in debug mode, change your URL in the browser from localhost:#### to 127.0.0.1:#### and see if that makes a difference. I found recently that it did.

joelt
Wow, thats quite a difference.Request dropped to 4ms total. :DThanks.
Ryan
+1  A: 

Is it only slow in Firefox? This sounds like the old IPv6 lookup problem that Firefox tends to suffer from.

If it's fast in IE, then follow these directions to turn off IPv6 lookups in firefox.

womp
Interesting, it was slow in Firefox, but not IE. Slow in Chrome as well. Who would have thought that Chrome and Firefox would be an issue./
Ryan