Redirect based on screen resolution and orientation

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
Spypick
 
 
Posts: 19
Joined: Wed Apr 28, 2021 9:17 pm

Redirect based on screen resolution and orientation

Post 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
User avatar
Pablo
 
Posts: 22476
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Redirect based on screen resolution and orientation

Post 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
Spypick
 
 
Posts: 19
Joined: Wed Apr 28, 2021 9:17 pm

Re: Redirect based on screen resolution and orientation

Post by Spypick »

OK, thank you for taking the time to reply.
Spypick
 
 
Posts: 19
Joined: Wed Apr 28, 2021 9:17 pm

Re: Redirect based on screen resolution and orientation

Post 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 :)
User avatar
Pablo
 
Posts: 22476
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Redirect based on screen resolution and orientation

Post 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.
Spypick
 
 
Posts: 19
Joined: Wed Apr 28, 2021 9:17 pm

Re: Redirect based on screen resolution and orientation

Post by Spypick »

Got it, thanks a lot for your quick reply, Pablo. Much appreciated 😊🙏
Post Reply