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.
- 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.
- 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.
精彩评论