How do i prevent the browser from making expensive DNS lookups?
Almost every ajax call I make, results in an expensive DNS look up. Are there headers I can set, that will prevent the browser from making DNS look ups. Or perhaps some server side settings开发者_C百科?
How do you know that this is causing a performance problem? Did you use Wireshark to verify? I very much doubt that DNS lookups are to blame.
Using the IP Address should prevent DNS Lookup :)
You could add the hostname/IP mapping in question to your hosts
file (on the computer where the browser is running).
The exact location depends on the operating system. On a 32bit Windows system this is %windir%\system32\drivers\hosts
, on Unix like systems this should be /etc/hosts
As far as I know, no DNS lookup will happen for entries in the hosts
file (at least not on Windows)
精彩评论