简体   繁体   English

我们可以在桌面浏览器上提供移动网站体验吗?

[英]can we provide mobile site experience on desktop browser?

Is it possible to show mobile site on desktop browser (with full functionality)? 是否可以在桌面浏览器上显示移动网站(具有完整功能)?

If some website(for example yahoo or google) detects the user agent to decide where to redirect, I want to force it to show me the mobile version. 如果某个网站(例如yahoo或google)检测到用户代理来决定重定向的位置,我想强制其向我显示移动版本。 Basically on the desktop browser, user needs to see how the mobile site would look. 基本上在桌面浏览器上,用户需要查看移动网站的外观。 I tried user-agent with php-curl but it loads the first page only and that too without images. 我用php-curl尝试了user-agent,但是它只加载第一页,也没有图像。

It is possible with add ons. 附加组件是可能的。 For Firefox, there is User Agent Switcher that I'm currently using. 对于Firefox,我目前正在使用User Agent Switcher For Safari, you can switch User-Agent directly in the Developer menu. 对于Safari,您可以直接在“开发人员”菜单中切换User-Agent。

There is this similar question on SuperUser that describe how to change User-Agent via about:config in Firefox. 在SuperUser上也有类似的问题 ,描述了如何通过Firefox中的about:config更改User-Agent。 Probably the only way that requires no installation of add-ons or extra softwares. 可能是无需安装附加组件或额外软件的唯一方法。

Personally, I would redirect mobile traffic to a subdomain, such as m.example.com . 就个人而言,我会将移动流量重定向到一个子域,例如m.example.com Then, you can access m.example.com directly in a desktop browser and you will see what it looks like for mobile devices. 然后,您可以直接在桌面浏览器中访问m.example.com ,然后您会看到它在移动设备上的外观。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM