[Javascript] Redirect mobile users to another page

[Javascript] Redirect mobile users to another page

Postby admin » Fri Mar 31, 2017 3:20 pm

Create an html landing page (e.g. mobile.htm) or redirect your visitors to another site.
Place code below before the <head>.
Just replace your-site.com with your domain name.

Code: Select all
<script type="text/javascript">
if (screen.width <= 699) {
document.location = "http://www.your-site.com/mobile.htm";
<script type="text/javascript">
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
The AVNW Support Team

We also have great domain names for your next website. Go through the list and make an offer now!

Shopping for a new website? See our design deals.

How much is your website worth? Get a free estimate.

And, if our post has provided you with great information, there are a few ways you can show your appreciation:
  1. Like us on Facebook
  2. Post a review.- Posting a good review about this site could help us provide improved support.

Thank You!
User avatar
Site Admin
Posts: 464
Joined: Sun Jan 12, 2014 11:18 pm
Location: New York City

Return to Support

Who is online

Users browsing this forum: No registered users and 0 guests