Redirects between web and mobile site

Description

How Go Mobile for Plone will direct users to correct version of content regardless how they arrive to web and mobile sites.

Introduction

Redirecting mobile users to mobile site is a critical user experience factor.

No matter on which kind browser user types in the address, the user should server the page in correct format.

Isn't it utterly annoying when you read emails on a mobile, someone has posted you a link, you click it and you are taken to slow, big, web page instead of mobile page?

Methods of browser discrimination

There are basically three different way to discriminate how web and mobile content is served.

  • User explicitly needs to type in the address of a mobile site or follow a link. Since this is cumbersome, you cannot really expect your users to do this.
  • Use the same URL and always detect mobile users by the browser user agent header. This is applicable only if the site has been built ground up mobile in mind.
  • Web site URL with a redirect to mobile site URL. The user can opt in back to web browsing if they still need to find some content which does not have mobile presentation using a link "Go to web site". The web user can be also opt in to mobile by manually typing in mobile specific address (.mobi domain name)

Go Mobile for Plone uses the third opinion by default. The architecture is flexible and other options, like trusting the browser user agent header only, are possible.

Preserving the wanted content page in redirect

Unlike most solutions, Go Mobile redirector is able to match web and mobile content always. The user gets the correct content page always and is not sent to site root when coming to the site on a mobile phone.

  • The content, which the user is looking for, in not lost if the user is being redirected
  • The user can opt-out from the mobile site and stay on the web site with the mobile if the user wishes so

Redirecting logic

../_images/redirecting.png

Redirecting logic

  • HTTP request arrives to the web site from the user browser
  • Mobile browser is detected using brand detection
  • HTTP Moved Temporary response is given and the user is taken to mobile site
  • Mobile site as a link "Go to web site" which points to website.com/@@force_web
  • If the user clicks this link a special cookie is not set, so that he/she is no longer automatically taken to mobile site from this browser

Web and mobile domain name mappings

By default, Go Mobile will prefixes your web site name with m. domain name prefix and assumes this is your mobile site. This can be changed in settings. WWW prefix is removed from the domain before redirecting.

E.g. Visitor coming to yoursite.com with a mobile browser is redirected to m.yoursite.com, still having the content path intact.

If you use Go Mobile Convergence add-on and the page does not exist in the mobile domain, let's say a forum post comment page which is too complex for a mobile, the user is redirected to the mobile site root.

Manual redirecting URLs

Go Mobile exposes two views to all content objects which you can use to do manual redirects

  • @@go_to_mobile_site
  • @@go_to_web_site

These views map to URI namespaces and if use properly, they do not lose the desired content, when redirecting.

You can add the URL expressions e.g. to site actions using the following TALES expression:

string:${object_url}/@@go_to_mobile_site

Or simply adding a link by hand in WYSIWYG editor HTML mode:

<a href="@@go_to_mobile_site">Go to mobile site</a>

Note that this method assumes that your content sets the page base url in HTML <head>. All Plone content does this by default.