User-Agent Styled Web Applications

   This idea came from awhile back when I was working on my project rustkickers. The purpose of the site is to provide documentation on all things motor related. While working on a demo for the site used a old car manual to create some of the designs. That goes me thinking why not make multiple site designs around different car manufactures. Then even further down the rabbit I landed here, which is what this article. Another thought but a cool one I think and yes I know you can't trust the user-agent but it doesn't matter its just the style not the content. 

Intial Solution
After playing around with this idea for awhile I figured handling this is the frontend at all was not worth it because of performance. Unless your looking at it with a single css and changing the url based on the device in an single page app. Instead I went with a backend solution and handled it in the razor view.

Handle with Aspnet layout in razor
HttpBrowserCapabilities capability= Request.Browser;
var BrowserName = capability.Browser;
var version = capability.Version;
var platform = capability.Platform;

Popular posts from this blog

Aspetcore: NLog with Postgresql

Mongodb Cheatsheet

Installing Windows on Acer chromebook 15 cb3-532