禁用 Facebook 移动浏览器检测?

发布于 2024-12-04 22:13:39 字数 312 浏览 4 评论 0原文

有谁知道如何通过查询字符串参数禁用 Facebook 的移动浏览器检测和重定向功能?

例如,如果我在移动浏览器中访问 www.facebook.com/CraigslistGenie,我会被重定向到http://m.facebook.com/CraigslistGenie。我希望用户留在该页面的 www 版本上。

Does anyone know of a way to disable the mobile browser detection and redirect feature of Facebook via querystring parameters?

For example, if I go to www.facebook.com/CraigslistGenie in a mobile browser, I get redirected to http://m.facebook.com/CraigslistGenie. I would like the user to stay on the www version of the page.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

雨后彩虹 2024-12-11 22:13:39

您可以更改用户代理来实现此目的,或者将 ?m2w 添加到链接,即 http://www.facebook.com/CraigslistGenie/?m2w 不会重定向(在 Android 上测试),而 http://www.facebook.com/CraigslistGenie 确实重定向到 http:// /m.facebook.com/CraigslistGenie

参考请参阅此处此处

you either change the user-agent to achieve that or you add ?m2w to the link i.e. http://www.facebook.com/CraigslistGenie/?m2w does NOT redirect (tested on Android) while http://www.facebook.com/CraigslistGenie does redirect to http://m.facebook.com/CraigslistGenie

For reference see here and here.

み青杉依旧 2024-12-11 22:13:39

第一个答案是正确的,但是如果您希望它在 Android 手机上运行(并在单击网站内的链接时继续工作),您需要进入浏览器设置(在进入 http://facebook.com?m2w)并检查“桌面版本”设置。
这将防止浏览器不断尝试将您发送到网站的移动版本或 FB 应用程序。

The first answer is correct, however if you want it to work on an Android phone (and keep working when you click on links within the site) you need to go into the browser settings (after you've gone to the http://facebook.com?m2w) and check the "Desktop version" setting.
This will prevent the browser from constantly trying to send you to either the mobile version of the site or the FB app.

妞丶爷亲个 2024-12-11 22:13:39

Yahia给出的方法很好。在链接中添加 ?m2w 意味着将移动设备视图转换为网页视图。

或者,
更改移动浏览器的设置,即用户代理。不过,Steel 和 Dolphin 浏览器都允许您更改该设置。两者在市场上都是免费的。 (我没有对浏览器进行任何营销。)

你们中的一些人可能已经注意到,尽管更改了浏览器中的用户代理,但您仍然会被发送到移动网站。检查此补丁

查看这个关于隐藏移动浏览器技巧的大型讨论

Method given by Yahia is good. Adding ?m2w to link means converting mobile to web view.

Or,
Change settings of mobile browser i.e. User Agent. Both Steel and Dolphin browsers allow you to change that setting however. Both are free in the market. (I am not doing any marketing of browsers.)

Some of you may have noticed that, despite changing the User-Agent in the browser, you are still sent to a mobile website anyway. Check this patches given.

Check this huge discussion about tricks used for hiding mobile browser.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文