How can you block access to an Internet explorer in asp mvc

I made the decision to cut back on Internet Explorer until I added support for some of the common W3 approved elements. Namely, “a few” in forms, as well as about 5 other things ...

So, I would like to encourage my visitors to use a better browser.

Is there a way to configure the http handler, or perhaps something in the asax file, to redirect all users to a user page?

** EDIT **

I know that I can use this to get the browser, I'm just not sure how to make the handler a request header handler, and then redirect if it's IE

HttpContext.Request.Browser.Browser

+3
source share
3 answers

Okie dokie,

The site is configured so that you need to be logged in to use the site, so I did this on the login page.

public ActionResult LogOn()
{
    if (HttpContext.Request.Browser.Browser == "IE")
        return RedirectToAction("IE", "Home");
    else
        return View();
}
+3
source

Just use this:

http://code.google.com/p/ie6-upgrade-warning/

enter image description here

If you just want to discover Internet Explorer so that you can notify the user that several files cannot be downloaded in your browser, look here:

http://msdn.microsoft.com/en-us/library/ms537509(v=vs.85).aspx

+8
source

For jQuery on the client site, another parameter uses the jReject plugin :

 $(document).ready(function () {
         $.reject({
             reject: {
                 safari: true, // Apple Safari  
                 chrome: true, // Google Chrome  
                 msie: true, // Microsoft Internet Explorer  
                 opera: true, // Opera  
                 konqueror: true, // Konqueror (Linux)  
                 unknown: true // Everything else  
             }
         }); // Customized Browsers  

         return false;
     });
+1
source

Source: https://habr.com/ru/post/1794980/


All Articles