How to determine what device is being used to enter website

Topics: Administration, Customizing Orchard, General, Writing modules, Writing themes
Dec 3, 2012 at 7:17 AM
Edited Dec 3, 2012 at 7:35 AM

Is it possible to determine what device is being used to enter the website (PC or mobile) in Orchard? As far as I understand form this article http://weblogs.asp.net/bleroy/archive/2011/02/27/dynamically-switching-the-theme-in-orchard.aspx  dynamically switching themes is not bad idea, but I need to determine device type before switching. 

Any ideas?

Coordinator
Dec 3, 2012 at 8:13 PM

All browsers are sending info of this sort in headers with each request. Those can be accessed through the current HTTP context.