Disable mobile page redirection for SharePoint 2013

Posted on 10/22/2013 @ 2:04 PM in #SharePoint by | Feedback | 3746 views

SharePoint 2013 (foundation too), detects requests from mobile devices and automatically changes the uRL of the requested non mobile page to its mobile substitute. This logic is now built into SPRequestModule.

The mobile view is pretty damned amazing. Even though the set of pages for mobile access is completely different, SharePoint has an entirely separate set of controls for the mobile pages. These are in the Microsoft.SharePoint.MobileControls namespace which inherit from Microsoft ASP.NET controls in the System.Web.UI.MobileControls namespace. These Mobile pages can even use mobile Web Part adapters to mimic the behavior of webparts on mobile webpart pages.

The way this works is that once a mobile device is detected, all requests from a mobile device are redirected to a version of the page that is optimized for viewing from a mobile device. These pages by default live in the _layouts\Mobile folder.  This home page redirection is completely customizable, but say out of the box for a team site, the redirection is sent to _layouts\Mobile\mblwp.aspx. You can substitute a custom mobile home page and that page can have links to other custom mobile pages. You can implement a custom mobile home page using the article shown here.

But lets say, if you want to completely disable this mobile redirect, just open the web.config of your SharePoint web app, and in system.web, stick the below code snippet!

   1:  <browserCaps>
   2:  <result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
   3:  <filter>isMobileDevice=false</filter>
   4:  </browserCaps>

Easy!

Sound off but keep it civil:

Older comments..