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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Why Browser Sniffing Stinks

9 点作者 ajbatac将近 16 年前

4 条评论

SamAtt将近 16 年前
I found a lot wrong with this article. But the two that bothered me the most were these.<p>"Reduced scalability and increased maintenance"<p>The author claims code "can never be future proofed" because of different browsers. I don't see why that's so. I personally use a renderhtmlforbrowser() function that uses a switch statement. So all I have to do when a new browser comes out is add another string to the switch statement and another function for the renderhtmlforbrowser function to call.<p>"It's Rarely Required"<p>The author says "Web standards have made browser sniffing far less necessary on the server" but I disagree with that. Standards have made things easier in that you can create HTML that won't be completely mangled by one browser while working fine in the other. But anyone whose tried knows that a site's appearance can be completely different in two separate browsers even though they are both standards compliant (even with CSS). So anyone who cares how their site looks still needs to pay attention to all browsers
评论 #636242 未加载
评论 #636273 未加载
rythie将近 16 年前
Most the non-IE browsers work pretty well and get updated quickly to fix problems. IE needs the workarounds and for that you can use conditional comments (<a href="http://www.quirksmode.org/css/condcom.html" rel="nofollow">http://www.quirksmode.org/css/condcom.html</a>).
jbm将近 16 年前
x100.<p>Mixi, the Japanese social networking service, has a mobile site. I was trying to surf to it via my DSi; but they refuse mobile connections from anything but a mobile browser that is recognized in their DB. They might have complicated that further by some awful IP address restrictions (thank you so much, jphone ruby package /sarcasm).<p>Result? I need to load the full website on a game system that simply cannot handle it. It cannot compare in the slightest to experience to the experience loading mobile Facebook. (Although to be fair, Mixi cannot compare favorably to anything done after Friendster anyway).<p>Please people, unless you really have to - don't browser-sniff.
TweedHeads将近 16 年前
IE is like an 800lbs weight belt locked around the waist of the web.