开发者

Bounce user over to mobile site, but still allow "full site" view

This is scenario I'm going for:

User visits the site, site.com, meta tag detects that the user is on a mobile device, and bounces the user over to m.site.com. Then, the user sees a link for "View full site," and clicks on it.

But then, the site bounces the user over again.

Is there a clean way of handling this? Allowing the user to 开发者_StackOverflow中文版choose which version he/she wants to see, but by default, first going to the mobile site?

Thanks!


Tonnes of ways I can thing of.

    1. You could have a parameters/page which the user visits. For example google have /ncr (no country redirect). When the user visits this particular page you could set a session/cookie which can be monitored to prevent redirection. -You could only redirect the user if a particular cookie is not detected, and they are using a mobile user-agent.
    1. You could check the referer in addition to the user-agent, and if the referer has come from m.site.com then don't redirect.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜