Loading...

Knowledge Base

Redirecting Mobile Browsers

We are currently waiting for an update from Avanquest that will include a redirect widget that works with all mobile browsers. In the mean time I have found a neat little trick that uses the screen resolution to redirect people to your mobile website.

Here is what you need to do:

  1. Create a mobile version of your website formatted for the smaller screens.
  2. Create a subdomain for your Mobile site( see article on creating subdomains)
  3. Upload the mobile site to the server
  4. Add the redirect code below to the head elements area of your website.
  5. Publish your Website

Now if you go to your website on a mobile device you will be redirected to the mobile version of the website. Please note that some of the ipads and other tablets have Hi Def screens… using this method those devices will go to your full site.

-----------------------------   Redirect code   ----------------------------------

 

<script type="text/javascript">
<!--
if (screen.width <= 800) {
[removed] = "http://m.domain.com";
}
//-->
</script>

-----------------------------------   end code   ---------------------------------------

Did you find this article helpful?

 
* Your feedback is too short

Loading...