Page 1 of 1

Redirect based on screen resolution and orientation

Posted: Wed Apr 28, 2021 9:35 pm
by Spypick
Dear Pablo,

First of all, thank you for designing such a great software, it is the best web editor I have used and I shall convince my school to purchase several versions for our school purposes.

I have designed a website where each page has 3 versions.
1) one version for screen width bigger than 1024 px (both portrait and landscape orientations)
2) one version for screen width smaller than 1024 px in portrait orientation
3) one version for screen width smaller than 1024 px in landscape mode

I read that you suggested this was an interesting option and that you advised to use the ready-to-use script for redirection based on screen resolutions. The script obviously works fine when the resolutions changes but I can't find a way to redirect based on the orientation of the screen as well.

I would be very grateful if you could help me find the way to do it. Many thanks 😊🙏

Pierrick

Re: Redirect based on screen resolution and orientation

Posted: Thu Apr 29, 2021 6:15 am
by Pablo
I'm sorry, there is no script to redirect the user based on the orientation.
This requires a custom script.

For example:
https://stackoverflow.com/questions/351 ... -landscape

Re: Redirect based on screen resolution and orientation

Posted: Thu Apr 29, 2021 7:02 am
by Spypick
OK, thank you for taking the time to reply.

Re: Redirect based on screen resolution and orientation

Posted: Thu Apr 29, 2021 8:11 am
by Spypick
Last question (as a follow-up to the previous one) if you don't mind:
If I make my website responsive using landscape / portrait breakpoints, with some elements visible/hidden on landscape orientation and other elements visible/hidden on portrait orientation, will the hidden portrait elements be loaded when the user is browsing the landscape version and vice versa? The goal would be not to cram the page with too many elements that are loaded regardless the screen orientation the user is using. Many thanks :)

Re: Redirect based on screen resolution and orientation

Posted: Thu Apr 29, 2021 9:05 am
by Pablo
I think the browser will load all images. Even if they are not visible.
But you can use 'lazy load' to prevent this.

Note that it is not common to create a different layout for portrait and landscape mode.

Re: Redirect based on screen resolution and orientation

Posted: Thu Apr 29, 2021 9:31 am
by Spypick
Got it, thanks a lot for your quick reply, Pablo. Much appreciated 😊🙏