.NET framework 4.7 has a Browser
property on HttpContext.Request
which gives you information about the browser, from where the HTTP request came from. Unfortunately, ASP.NET core does not have this feature and the ASP.NET team decided to not port it.
Here is the response from the team.
Great app, lame new logo The best personal phone internet browser because of the unique and accessible way Firefox places my most used sites right under the search bar, so I can get there with a single click—and be signed in already! Download the latest from Windows, Windows Apps, Office, Xbox, Skype, Windows 10, Lumia phone, Edge & Internet Explorer, Dev Tools & more. The World's Most Popular Fasting App Fast forward to better health. Fast track your goals when you track your fasts with Zero—expert guidance, insights, and accountability to unlock a longer, healthier life. Browser Care 3.0 – Browser maintenance app. Disk doctor: system cleaner 4 1. August 29, 2015 Browser Care is a powerful application that allows you to keep your browsers clean and under control since navigating accumulates files on your Mac.
Hi, the browser caps feature in ASP NET 4.x was a server-based way of doing client feature detection. This approach is generally frowned upon in the 'modern' era, where runtime client-side feature detection is preferred, using techniques such as progressive enhancement. For that reason, in addition to being a huge maintenance cost to keep the list even reasonably up-to-date, the feature was not brought forward to ASP NET Core.
While I agree with the above response, IMHO, There are certain use cases where browser detection needs to be done on server side. A good example is a proxy server acting as a gateway for requests coming to your web server. Winclone pro 6 6 1 8. Based on the browser, the gateway can route the traffic to different versions of your app/servers (think about an A/B testing infrastructure, targeting a user base from a specific browser / browser version).
I ended up writing a light weight browser detection library.
This library adds the following capabilities to your asp net core app
- Browser detection
- Device type detection
- Operating system detection
How to use ?
Step 1:Install the BrowserDetector nuget package
Step 2: Enable the browser detection service inside the ConfigureServices
method of Startup.cs
.
Step 3: Inject IBrowserDetector
to your controller class or view file or middleware and access the Browser
property. The property is lazy loaded.
Example usage in controller code
Example usage in view code
Example usage in custom middlware
You can inject the IBrowserDetector
to the InvokeAsync
method.
Browser Care 3 0 – Browser Maintenance App Download
Help this project ?
You can further help the project by visiting http://bit.ly/detectbrowser in your browser and see the detection works. File an issue if you see wrong data.
Browser Care 3 0 – Browser Maintenance Apps
Cheers