Joe6207668
Posts: 0
Joined: Wed Sep 04, 2013 6:24 pm

Redirecting PC viewers of a mobile web app to a page explaining the mobile web app

Hello!

I need help implementing a method that would redirect a viewer of my mobile web app. Ideally, the app is to act as a mobile web app, however it doesn't look right on a PC sized display.

My problem is where to add the js code using the Appery builder. Do I need to check in the http header for device screen display size?

Also I'm not sure whether to add a page using the builder and redirect PC viewers to it, or redirect to a different website entirely.

Thanks!
Joe

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Redirecting PC viewers of a mobile web app to a page explaining the mobile web app

It's up to you where or how you want to redirect the user. You should be able to find scripts on the Internet that check the user's browser and allow you to redirect to some URL.

Joe6207668
Posts: 0
Joined: Wed Sep 04, 2013 6:24 pm

Redirecting PC viewers of a mobile web app to a page explaining the mobile web app

Hey Max!

Thanks for the quick response and the useful article.

So I'm guessing this is the js code I need to redirect my PC viewers:
window.location.replace("http://mydomain.com");

Where exactly should I add this code? As a javascript file in my project? Also any useful tips regarding checking my user's screen size would be helpful.

Thanks!
Joe

Return to “Issues”