Definitions: Device Channel is a new feature in 2013, which enables the site content to render differently in different devices without changing the URL.
Some points:
- This feature is only available with SharePoint publishing sites.
- SharePoint Site Collection can support maximum 10 Device Channels only.
- A Device Channel can have maximum 150 Device Inclusion Rules.
Description:
- For this feature to work, we need to create Device Channel from Site settings >> Look and Feel >> Device Channel
- Enter User Agent String (Explained below) in “Device Inclusion Rules”. This value is used to identify the device from which the user is accessing the application.
- For different devices we can create different master pages with different styles, images, content styles.
- Each master page will be assigned a Device Channel. We can assign a Device Channel to Master page from Site Settings >> Look and Feel >> Master Page
- Based on User Agent string, browser can change the master page and render the content to the user.
User Agent String:
- User Agent string contains the information of what type of device you are using to access the site.
- User Agent string is different for different device and browser
- If you are connected to internet, just type “what is my user agent” in browser to know your user agent string.
- You can also get user agent string with JavaScript Command “navigator.userAgent”. Open browser >> Press F12 (developer tools) >> go to console >> write command “navigator.userAgent” >> Enter. You will be given user agent string. You can use this value in device channel.