Skip navigation
ofthebridge
Currently Being Moderated

what script do I use to redirect to new muse mobile site uploaded to an existing site?

Dec 19, 2012 4:46 PM

Tags: #mobile_devices #mobile_site #mobile_redirection

I'm creating a mobile site that I will upload to an existing site outside BC. What script should I use to detect the mobile device and redirect to the new mobile site?

 

<script type="text/javascript">

if ('desktop' == 'phone') {

        window.location = 'http://www.site.com/phone/index.html';

           }

</script>

or

 

<link media="only screen and (max-device-width: 370px)" rel="alternate" href=".../phone/index.html" />

 

or something different.

 

thanks

 
Replies
  • Currently Being Moderated
    Dec 19, 2012 7:41 PM   in reply to ofthebridge

    Here is the script I use.

     

    </script>

    <script type="text/javascript">// <![CDATA[ 

        var mobile = (/iphone|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigat or.userAgent.toLowerCase())); 

        if (mobile) { 

            document.location = "http://WWW.YOURWEBSITE.COM"; 

        } 

    // ]]></script> 

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 19, 2012 8:53 PM   in reply to iamDK

    If you're using Muse 3.0 or later, you shouldn't have to do anything - Muse will handle the redirect logic automatically.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 21, 2012 3:56 AM   in reply to adobelance

    If you just build your mobile website in Muse, but your standard website not. Is there functionality in Muse to create a script to push mobile or tablet users to the mobile site?  Or does that only work if you build one site to serve all within Muse?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points