移动网站的用户代理,域更改 [英] User agents for mobile site, domain changing
本文介绍了移动网站的用户代理,域更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个移动网站,我想将用户重定向到domain.mobi或mobile.subdomain(我们都有设置)
I have a mobile site and I'd like to redirect users to the domain.mobi or mobile.subdomain (we have both setup)
- 如何确定移动浏览器
- 将移动站点放在不同的域或子域上是不好的做法吗?
- How do I determine a mobile browser
- Is it bad practice to have the mobile site on a different domain or subdomain?
推荐答案
- 如何确定移动浏览器
以下是可以完成此工作的JavaScript: http://www.quirksmode.org/js/detect.html
Here's some javascript that will do the job: http://www.quirksmode.org/js/detect.html
- 将移动网站设置在其他域中是否是错误的做法? 子域?
- Is it bad practice to have the mobile site on a different domain or subdomain?
这是一个好习惯,一种流行的惯例是使用 http://m.yoursite.com 如果您的主要网址是 http://yoursite.com
It's good practice, and a popular convention is to use http://m.yoursite.com for mobile if your main url is http://yoursite.com
诺亚
这篇关于移动网站的用户代理,域更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文