Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an easy way to force the user to use Internet Explorer, ideally without installing anything new?

I am working on 4 internal websites, everyone should be using IE but not everyone is.

Is there an easy way to force the user to use IE, ideally without installing anything new like JQuery?

Cheers, Kohan


Addendum

I really shouldn't have to justify why i'm wanting to do this, but here goes.

This site is totally internal and 98% of the users do not have the rights to install a new browser... however there are a select few that do. This is fine for most of our sites, but since these sites are very old, they do not work in anything but IE. I could fix it for all browsers... but it is a better use of my time to just put a "hot-fix" in for now as it will likely all get rewritten next year. The site itself is also only used once a year. It's simply not worth the time investment in this case.

Thanks Kohan.

like image 337
4imble Avatar asked Jan 18 '23 10:01

4imble


1 Answers

If you really wanted to do this you could check the user agent of each request and if it's not IE redirect to a holding page explaining that they need to change browsers.

var userAgent = HttpContext.Current.Request.UserAgent;

Alternatively use the Request.Browser property.

if(HttpContext.Current.Request.Browser.Browser != "IE")
{
   // do stuff...
}
like image 151
Andy Rose Avatar answered Feb 08 '23 11:02

Andy Rose