In this article: About displaying dynamic content according to device type | Examples | Redirect mobile visitors to a different page | How to set up a device type condition using If-So
Studies have shown that user behavior is different on mobiles, tablets, or desktops. With If-So’s device type condition, you can easily optimize your website’s content experience for each device. You can choose to replace some of your page content, replace the whole page, or add new content on certain devices only.
Unlike responsive design, If-So’s solution is a server-side solution. This means that the content you set to be displayed on certain devices will not be loaded on others. This results in faster page loading, and a convenient way to manage and optimize content.
Usage examples:
Possible Use Cases
Display a click to call button on mobile devices
Suggest downloading the right app for the user’s device
Same as with all of If-So’s dynamic triggers, any of the website’s content can be customized. This includes titles, texts, images, calls to action, buttons, and more.
If-So’s device type condition can be used to redirect mobile visitors to a new page. The following JavaScript code creates an auto-redirect to a page of your choice (make sure to replace http://www.example.com with the URL of the page you want to redirect to). To create the redirect on mobile devices only, create an If-So trigger with a Device Type condition, and paste the code into the relevant content field (See step by step instruction below).
<script>
window.location.replace("https://www.example.com");
</script>
*Elementor or Gutenberg user? This condition can be used to set up a conditional element or block (Learn more: Gutenberg | Elementor).
Yes.
Whether you are using a caching plugin or server caching, you can navigate to the plugin settings and enable the “Page Caching Compatibility” option. With the option enabled, dynamic triggers will be rendered in a separate request that will take place after the loading of the cached version.
Yes, you can set up conditional redirects based on any If-So condition. For a step-by-step guide, click here.