Something like this might be useful to detect whether your request is visited by a mobile device or not. The following video will only display if the current request is not a mobile device.
The property Request.Browser.IsMobileDevice is part of the .NET Framework, rather than being Umbraco specific. It can be used within a view or a controller depending on where you want to perform the detection.
Server side device detection
Hi Guys Sorry for maybe putting this in the wrong category.
I've been searching for a solution to detect wich device my umbraco website is been viewed at.
Why, because I've a HTML 5 Movie:
...and i only want to load it if the website is visited by an desktop - to get rid of the movie geting loaded on a mobile ore tablet.
Can some one put in an direction - it would be much appreciated :o)
Hi Mads,
Something like this might be useful to detect whether your request is visited by a mobile device or not. The following video will only display if the current request is not a mobile device.
I hope that helps.
Thanks, Dan.
Hi Dan That sounds pretty easy :D
Is it just basic razor script? And is there som umbraco documentation somewhere?
Hi Mads,
The property
Request.Browser.IsMobileDevice
is part of the .NET Framework, rather than being Umbraco specific. It can be used within a view or a controller depending on where you want to perform the detection.Thanks, Dan.
is working on a reply...