开发者

How do i prevent the browser from making expensive DNS lookups?

开发者 https://www.devze.com 2023-02-04 06:30 出处:网络
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百科?

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消