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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

User agent overrides for top Japanese Sites

43 点作者 asyncwords将近 10 年前

8 条评论

holygoat将近 10 年前
Fennec dev here. Figured I&#x27;d address some of these comments.<p>UA overrides are not the only tool in our toolbox. They&#x27;re deployed in concert with outreach from webcompat.<p>UA overrides are a way of <i>breaking</i> a cycle, not preserving it.<p>They make it feasible for Japanese users to use Firefox without manually messing around with UA overrides (e.g., using Phony). And that gives us leverage. And with leverage our excellent webcompat team can get sites to make changes.
asyncwords将近 10 年前
It&#x27;s an unfortunate state of affairs when a modern browser has to spoof another browser just to get the right content. The user agent in Microsoft&#x27;s new browser does this by default [1][2]. As a user, I&#x27;d love to see a day when browsers don&#x27;t reveal their user agents and web developers rely on feature detection instead. I admit, though, that I haven&#x27;t fully considered the collateral damage that might come with that.<p>[1]: <a href="http:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;31279980" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;31279980</a><p>[2]: <a href="http:&#x2F;&#x2F;blogs.windows.com&#x2F;msedgedev&#x2F;2015&#x2F;06&#x2F;17&#x2F;building-a-more-interoperable-web-with-microsoft-edge&#x2F;" rel="nofollow">http:&#x2F;&#x2F;blogs.windows.com&#x2F;msedgedev&#x2F;2015&#x2F;06&#x2F;17&#x2F;building-a-mor...</a>
评论 #9919071 未加载
评论 #9918687 未加载
评论 #9918688 未加载
评论 #9919345 未加载
评论 #9919025 未加载
评论 #9918803 未加载
评论 #9918388 未加载
评论 #9919595 未加载
jrockway将近 10 年前
This is certainly unmaintainable. There are two aspects I find especially interesting.<p>The first is how many different ways sites are determining the browser corresponding to the user agent. You know that they&#x27;re all based on &quot;guess and test&quot;: come up with an idea for an if condition, open up the code in the 5 browsers you care about, see if the result works. It almost reminds me of the output from a fuzzer: it&#x27;s a valid answer, but you can tell a random number generator and a lot of tries is what got you there.<p>The second is how many web developers seem fine writing the same website many times; once for mobile, once for IE, once for Chrome, once for Firefox. I&#x27;ve always taken the approach of doing exactly one site, and using whatever features are available in the worst browser the client wants supported. If extensive workarounds are needed to make the feature work in every browser, I say skip it. (I was always happy with what IE6 could do.) Of course, when I did web development, it was mostly boring corporate applications, not public websites that face pressure from competitors that are willing to write a codebase from scratch for every browser back to NSCA Mosaic. I consider myself very lucky.
ShaneWilton将近 10 年前
Things like Modernizr and feature detection are great, but I&#x27;m excited to see what happens when coeffects [1] have some more research behind them, and end up being supported by a mainstream programming language.<p>The idea is that you&#x27;re able to encode information about the execution environment into the type system, so that you can do things like write functions that depend on having access to GPS coordinates, or an audio output device, and so on.<p>The theory is that this will make it easier to target a wide variety of platforms, or devices which may restrict access to information through permissions systems, like those offered by Android or iOS. If, at compile time, you know you&#x27;ve handled all of the cases of an environmental constraint either being met, or not being met, then you have a much stronger guarantee that your code isn&#x27;t going to unexpectedly fail spectacularly on a platform you haven&#x27;t tested against.<p>[1] <a href="http:&#x2F;&#x2F;tomasp.net&#x2F;blog&#x2F;2014&#x2F;why-coeffects-matter&#x2F;" rel="nofollow">http:&#x2F;&#x2F;tomasp.net&#x2F;blog&#x2F;2014&#x2F;why-coeffects-matter&#x2F;</a>
whoopdedo将近 10 年前
UA overrides are enabling the poor web design that necessitates them. If web sites aren&#x27;t punished for doing the wrong thing they&#x27;ll keep doing, requiring more overrides, which hides the bugs, etc.<p>Stop this feedback loop. The client is not responsible for the server&#x27;s bugs.
评论 #9918915 未加载
评论 #9919586 未加载
评论 #9918720 未加载
tracker1将近 10 年前
I really wish that all phone&#x2F;tablet&#x2F;mobile OSes would simply include an X-Screen-Size (Xpx, Xpx, Xcm) and X-Touch-Enabled header.<p>I&#x27;ve used the detectmobilebrowsers.com as a baseline in the past, and only tweaked slightly so that fallbacks with &quot;phone&quot; will be xs (extra small), otherwise common mobile OSes would get &quot;sm&quot; (small), while desktops get &quot;md&quot; (medium) ... if you use adaptive CSS, and JS you can&#x2F;should of course adapt if the pre-rendered environment doesn&#x27;t match.<p>There are other modules written to predetermine a lot more, but it&#x27;s all kind of a bit sad.
MichaelGG将近 10 年前
I guess this then contributes to a feedback loop. People will check their stats, see that Firefox isn&#x27;t used, and pay less attention. Sucky position to be in.
realusername将近 10 年前
There is a lot of websites like this unfortunately, Gmail, Google Maps, Youtube, Office 365... Just try to browse a bit with Firefox for Android and you will see...