TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Saved 10 billion DNS queries per month by disabling DNS Prefetching

159 点作者 necro大约 14 年前

12 条评论

Xk大约 14 年前
That's all very nice, but it seems to do more with the fact that each person gets his/her own subdomain. And given that I found three xss's in about five minutes [edit: and then like ten more in the next five seconds, after realizing any input box works] doesn't give me confidence in their abilities.<p><a href="http://www.pinkbike.com/news/search/?q=%3C%2Ftitle%3E%3Cscript%3Ealert%28%22xss%22%29%3C%2Fscript%3E&#38;x=0&#38;y=0" rel="nofollow">http://www.pinkbike.com/news/search/?q=%3C%2Ftitle%3E%3Cscri...</a><p><a href="http://www.pinkbike.com/product/compare/?items=466,%22%3E%3Cscript%3Ealert%28%22xss%22%29%3C/script%3E" rel="nofollow">http://www.pinkbike.com/product/compare/?items=466,%22%3E%3C...</a><p><a href="http://www.pinkbike.com/photo/list/?date=all&#38;text=%3C/title%3E%3Cscript%3Ealert%28%22xss%22%29%3C/script%3E" rel="nofollow">http://www.pinkbike.com/photo/list/?date=all&#38;text=%3C/ti...</a><p><a href="http://www.pinkbike.com/buysell/list/?q=%3Cscript%3Ealert%28%22xss%22%29%3C%2Fscript%3E&#38;category=0&#38;pmin=&#38;pmax=&#38;region=3" rel="nofollow">http://www.pinkbike.com/buysell/list/?q=%3Cscript%3Ealert%28...</a><p><a href="http://www.pinkbike.com/forum/search/?q=%3C/title%3E%3Cscript%3Ealert%28%22xss%22%29%3B%3C%2Fscript%3E" rel="nofollow">http://www.pinkbike.com/forum/search/?q=%3C/title%3E%3Cscrip...</a><p>Edit: I've stopped adding xss's. It's actually harder to find input boxes which <i>don't</i> lead to xss's than ones which do.
评论 #2307658 未加载
ars大约 14 年前
Summary (he really should have said this part upfront):<p>He is (ab)using subdomains, by giving every user a different subdomain on his site. So a typical page can have links to hundreds of different subdomains on the page.<p>For a normal site disabling prefetching is not necessary or a good idea.<p>This article should be renamed: "Why using hundreds of unique subdomains is not a good idea." Besides all the DNS queries, you are also messing with caches.<p>I don't know anything about his site, but I don't see any reason that every user needs a unique subdomain.
评论 #2306905 未加载
评论 #2307011 未加载
评论 #2306932 未加载
davidu大约 14 年前
The real issue is that the cost per query is negligible here and DNS providers shouldn't charge by the query yet almost <i>all</i> of them do. They have to have some metric to separate the big guys from the little guys and charge the big guys more, but this is a crude way to do it.<p>Consider that publishers often have little control of how many DNS requests they get, so to charge for something out of your control seems utterly bizarre to me. Nice to see in this instance, publisher was able to make a meaningful improvement.<p>Also keep in mind, I used to run the largest free DNS service in the world so I'm well aware of what I'm talking about and am totally biased on these matters. :-)
评论 #2306842 未加载
评论 #2308381 未加载
coderdude大约 14 年前
I'm surprised the article doesn't actually tell you the meta http-equiv to disable DNS prefetching. It mentions that it helped out tremendously, though. Here it is:<p>&#60;meta http-equiv="x-dns-prefetch-control" content="off" /&#62;<p>or, if you're more into HTML5:<p>&#60;meta http-equiv="x-dns-prefetch-control" content="off"&#62;
评论 #2306717 未加载
评论 #2306730 未加载
joshfraser大约 14 年前
Before everyone goes rushing off to disable DNS prefetching, remember that DNS prefetching is generally a good thing that exists to make websites faster. And the faster your site is the more pageviews you can expect. Faster sites also have a lower bounce rate and better pagerank from Google.
评论 #2307227 未加载
Rantenki大约 14 年前
This implies that providers are either severely limiting their caches, or expiring in a shorter than posted TTL. Even though pinkbike looks like it has thousands of users, one would expect the front pages to be largely identical for most user sessions, so the ISP dns caches should already have most of those username.domain.com records cached. Either that or the ISP's DNS servers are more numerous and distributed, with fewer customers each, or something like that.<p>Anybody at an ISP that can fill us in on DNS TTL mangling or cache limiting?
评论 #2307573 未加载
评论 #2306799 未加载
patrickgzill大约 14 年前
I am actually rather shocked that people are being charged extra for DNS - surely the answer is to get any sort of cheap VPS and put DNS on that box? Then again, why are you depending for all aspects of your site's working at all, on a service which costs $2/month?<p>Even a 128MB RAM VPS could comfortably handle a huge number of requests.
评论 #2307933 未加载
datums大约 14 年前
Create an A Record for your highest queried subdomain. Those will be cached and eventually decrease the number of queries. Depending on the number of subdomain you can create and remove it on signup and cancellation.
ck2大约 14 年前
short answer for Firefox<p><pre><code> about:config network.dns.disablePrefetch (true) network.dns.disablePrefetchFromHTTPS (true)</code></pre>
评论 #2308413 未加载
评论 #2307631 未加载
andrewcooke大约 14 年前
ok i'm confused. why doesn't dns wildcard caching solve this?
评论 #2308451 未加载
gcb大约 14 年前
+ saved 10 billion DNS queries per month.<p>- wasted a total of 10sec of each user's time per month.<p>it's all about trade offs
评论 #2308457 未加载
评论 #2307223 未加载
评论 #2307431 未加载
togasystems大约 14 年前
As a fellow Mountain biker, I was surprised and glad that I saw pinkbike on HN.