[英]How can I request mobile version of a site locally (from my extension)?
I'm developing an extension for Firefox and I wonder: Is there any way to see request mobile version of a site? 我正在为Firefox开发扩展程序,我想知道:有什么方法可以查看请求的网站移动版本? In Firefox for Android there is a menu item that let's you request the "desktop version" of a webpage.
在Android版Firefox中,有一个菜单项可让您请求网页的“桌面版”。 How can I do the reverse?
我该如何做相反的事情?
Thanks a lot, G. 非常感谢,G。
This really depends on each site's implementation of "mobile" detection. 这实际上取决于每个站点对“移动”检测的实现。 Some will be responsive based screen size (using media queries client-side) where you can minimize your window size to test.
有些将基于屏幕大小进行响应(使用客户端的媒体查询),您可以在其中最小化要测试的窗口大小。 Others will read the User Agent Header on the HTTP request coming into the server and serve up the mobile version.
其他人将阅读进入服务器的HTTP请求中的用户代理标题,并提供移动版本。 User Agent can be spoofed.
可以欺骗用户代理。 Google for a Search Engine Spoofer Firefox Plug-in and change it to a say IPhone User Agent for example
Google搜索搜索引擎Spoofer Firefox插件,并将其更改为例如iPhone用户代理
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.