WebSite X5Help Center

6 RéPONSES - 2 UTILE
John S.
John S.
User

You could use a line of JS to check the width of the screen and then direct to a mobile version if screen narrower than xx - or the other way round.

Lire plus
Posté le de John S.
John S.
John S.
User

You could instead have a nice one-page site, that is good in both desktop and mobile.

On that page you tell the user that he/she can choose between a and b, and that if he does not choose it will happen automatically in xx seconds ( and then redirects according to screen width)

Then you have the A and B projects in subfolders. In each project you could have a menu item that leads to the a project if you are in B, and to the B project if you are in the A project.

Making it this way will let the user choose what he prefers. Maybe he does not want the site to change if he tilts his device from portrait to landscape - or the opposite.

Lire plus
Posté le de John S.
Claudio D.
Claudio D.
Moderator
Meilleur utilisateur du mois IT

in Pro version there is a function in Website that intercept the resolution and redirect automatically...

https://guide.websitex5.com/en/support/solutions/articles/44000796414-come-si-imposta-il-reindirizzamento-in-base-alla-risoluzione-del-dispositivo-

instead i prefere mantain only well designed website

---

nella versione Pro c'è una funzione nel sito web che intercetta la risoluzione e reindirizza automaticamente ...

io  invece preferisco mantenere solo un sito web / progetto ben progettato

Lire plus
Posté le de Claudio D.
Nektarios K.
Nektarios K.
User
Auteur

Thanks for the guidance 

I was found the following code and i test it working perfect to android also to iphone 

Andoid

<script type="text/javascript"><!--if(screen.width <=699){ document.location ="mobile.html";}//--></script>

Iphone

<script language=javascript><!--if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i))){ location.replace("http://url-to-send-them/iphone.html");}--></script>

Lire plus
Posté le de Nektarios K.
Esahc ..
Esahc ..
Moderator

Nektarios

Whatever works for you is great, but as Claudio said, the entry page with detect resolution is really easy. Your code seems to be the solution for detecting specific hardware. What happens with non android/apple operating Systems?

Lire plus
Posté le de Esahc ..
Nektarios K.
Nektarios K.
User
Auteur

Esahc,

Yes, you have right .... now I see carefully the entry page and the option for the viewport...

I will make it and test it.

Thanks 

Lire plus
Posté le de Nektarios K.