Skip to content

Instantly share code, notes, and snippets.

@Miroan
Created May 9, 2011 22:55
Show Gist options
  • Select an option

  • Save Miroan/963598 to your computer and use it in GitHub Desktop.

Select an option

Save Miroan/963598 to your computer and use it in GitHub Desktop.

Revisions

  1. Miroan created this gist May 9, 2011.
    10 changes: 10 additions & 0 deletions JavaScriptRedirectMobile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    <script type="text/javascript">
    if (screen.width<800)
    {
    window.location="http://yourdomain.com/mobile/"
    }
    else
    {
    window.location="http://yourdomain.com/"
    }
    </script>