If a script on the finished desktop page sends phones to the phone site, every phone downloads the full page first. Have the server recognise phones and redirect them before anything is sent, then test on several phones.

A glimpse of the wrong site

On a phone, a seafood restaurant's website opens on the full desktop home page: the large logo, a slider of plated dishes and the menu bar, all shrunk to fit.

A few seconds later, with the slider still loading, the screen jumps to the restaurant's phone site, a plain page with the menu, the hours and a button to call.

On a good connection the jump is a flicker. On a weak connection out on the wharf it can take ten seconds or more, and some visitors give up before the phone site appears.

Where the decision is made

The redirect is a short script on the desktop home page. It checks whether the browser is a phone and, if so, sends it to the phone site, but only once the page has finished loading.

A script set to run when the page has loaded waits for every image, every slide and every other script to arrive. The phone downloads the whole desktop page before it is told to leave.

It was a common way to bolt a phone site onto an existing one, needing a few lines in the page and no change on the server.

What the phone downloads first

By the time the script runs, the phone has already asked for:

Then the phone site loads its own page, images and scripts, so the visitor pays for two sites to see one.

Paid for twice

On Wi-Fi the cost is mostly time. On a data plan it is real data, spent on images the visitor never sees, and on a small plan that matters.

Phones also have less processing power than computers, so running the desktop scripts first adds delay even on a fast connection.

The tracking code on the desktop page may count a brief visit before the phone leaves, so Analytics can show phone visitors abandoning the home page within seconds.

Deciding on the server

The better place for the decision is the web server. Each request a browser makes describes the browser and the device, and the server can read that before it sends a single byte of the page.

If the request comes from a phone, the server replies at once with a redirect to the phone site. The phone downloads nothing from the desktop page, and the phone site starts loading straight away.

Most hosting accounts and content systems allow this, through the server's configuration or a few lines in the site's code. It is usually a modest change for whoever maintains the site.

Sending each page to its match

Phones do not always arrive at the home page. A link in an email or a search result may point to the menu, the private dining page or the hours.

Each of those should redirect to its own equivalent on the phone site, the menu to the phone menu, rather than every page to the phone home page, where visitors must start again.

A page with no phone version is better shown as it is than swapped for an unrelated phone home page.

A worked example

A cycling club in Nelson posts its group rides, race results and trail reports on a website with a large photo slider on the home page, and a separate phone site for the ride calendar.

On ride mornings, members check the calendar by phone, often from the trailhead. The phone site loaded only after the full home page, slider included, had finished.

On a weak signal, members stared at the first slide for what felt like half a minute, and some phoned the ride leader instead.

The developer who maintains the site for the club moved the redirect into the server's settings, so phones are sent to the phone site before any of the home page is sent.

Links to individual rides go to the same ride on the phone site, and a link at the foot of each phone page offers the full site, remembered for the rest of the visit.

Members at the trailhead see the calendar first. The slider, which was never meant for them, no longer stands in the way.

Letting visitors choose

Some phone visitors want the full site, to see the gallery or because they know where everything is on it. A link to the full site on every phone page lets them choose.

The server has to remember that choice, usually with a cookie, or it will redirect the visitor straight back to the phone site on the next click.

Tablets are a separate decision. Most show the full site comfortably, so an iPad or a Nexus 7 is usually better left on it.

Testing on several phones

Phones identify themselves in many ways, and a list that recognises iPhones but misses some Android, BlackBerry or Windows Phone models sends those visitors to the desktop site.

Test on as many as you can borrow, with Wi-Fi turned off so each phone uses its own connection, and check that a link to an inner page lands on its match.

Then check from a desktop browser and a tablet that neither is sent to the phone site by mistake.

The counter-case

Where the phone site is small and the desktop page is light, the delay from a script redirect may be slight, and moving it to the server matters less.

A site planning a responsive redesign may also choose to leave the redirect alone for now. One flexible site serving every device removes the redirect altogether.

Neither is a reason to leave a heavy home page in front of every phone visitor for long, since the server change is small and helps every phone visit at once.

Moving the redirect

  1. Open the home page on a phone with Wi-Fi off.
  2. Watch for the desktop page before the jump.
  3. Find the script that sends phones on.
  4. Move the decision to the server.
  5. Map each desktop page to its phone equivalent.
  6. Add a full site link that is remembered.
  7. Test on several phones and a tablet.

Step four is the change that removes the wait. Once the server answers phones with a redirect, nothing from the desktop page reaches them, however heavy that page grows.

Whether a separate phone site should stay at all, or give way to a responsive redesign, is weighed in a mobile site that looks like a different business.


Frequently asked questions

Why does the desktop site flash up before the phone site?

The redirect is a script that runs only after the desktop page has finished loading, so the phone downloads and shows that page before being sent on.

What is wrong with a script redirect?

Phones download the full desktop page, its images and scripts, then the phone site as well. That wastes time and data, worst of all on a weak signal.

How does a server-side redirect work?

The server reads how the browser describes itself in each request and, for phones, replies at once with a redirect, before sending any of the desktop page.

Should every page go to the phone home page?

No. Each page should redirect to its own equivalent on the phone site, and pages without one are better left on the desktop version.

Should tablets get the phone site?

Usually not. Most tablets show the full site comfortably. Test an iPad and an Android tablet, and decide on what visitors actually see.

How should the change be tested?

On several phones, with Wi-Fi off, using links to inner pages as well as the home page. Then check that computers and tablets still get the full site.

West Coast Media Solutions Inc. provides web design, web development, hosting, digital marketing, and business consulting to organisations across Canada, drawing on more than twenty-five years in the field.

Phone visitors watching your full site load first?

Send us the address, and we will check how phones are redirected and what moving that to the server involves.

Start a Conversation