适用于 Windows 的 Opera Mobile报告的屏幕尺寸

发布于 2024-09-02 08:04:59 字数 418 浏览 2 评论 0原文

我知道这不是一个直接的编程问题,但它有点相关,因为我试图在开始最新项目之前建立一个良好的测试环境。

我正在尝试设置 Opera Mobile for Windows 以允许我测试一个新网站。我得到的 UserAgent 是一个相当通用的,所以我的解决方法是调整我的 mobile.browser 文件以具有目标设备的正确屏幕宽度和高度。

是否可以添加到 Opera Mobile for Windows 可以假装的“假”用户代理列表中?目前支持S60、Android 和Windows Mobile。

I know this isn't a direct programming question, but's it's kinda relevant as I'm trying to get a good testing environment set up before I embark on my latest project.

I'm trying to set up Opera Mobile for Windows to allow me to test a new website. The UserAgent I get is a fairly generic one, so my workaround is to tweak my mobile.browser file to have the correct screen width and height of the target device.

Is it possible to add to the list of "fake" user agents that Opera Mobile for Windows can pretend to be? It currently supports S60, Android and Windows Mobile.

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

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

发布评论

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

评论(1

用心笑 2024-09-09 08:04:59

您可以使用 Fiddler 脚本修改标头。来自 http://www.fiddler2.com/fiddler/dev/scriptsamples 的示例。 asp,这里有一行可能特别令人感兴趣:

假设您的浏览器是 GoogleBot 网络爬虫

oSession.oRequest["User-Agent"]="Googlebot/2.​​X (+http://www.googlebot.com/bot.html)";

OnBeforeRequest

You can modify headers using Fiddler scripts. From the examples at http://www.fiddler2.com/fiddler/dev/scriptsamples.asp, here's a line that might be of particular interest:

Pretend your browser is the GoogleBot webcrawler

oSession.oRequest["User-Agent"]="Googlebot/2.X (+http://www.googlebot.com/bot.html)";

OnBeforeRequest

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