0

I am using asp.net in backend and Javascript (ExtJs) in frontend. I want my web app to open in some particular browser. ex: IE11. I thought to try noscript tag But not getting any idea how to get this.

Suppose I am able detect my browser then How I will restrict to IE 11 only. Can anybody suggest what I need to do.

shanky singh
  • 1,121
  • 2
  • 12
  • 24
  • @Kody There is a difference. How to detect and how to restrict. In case I detect my browser then How I can restrict my application only to that perticular browser. – shanky singh Jan 17 '17 at 16:50
  • 2
    @shankysingh Short answer - you can't reliably. The user will always be able to spoof his browser to appear like IE11 (if you check server-side), and will be able to trivially defeat client-side checks. However, if you don't need to do it reliably, then once you have detected the browser, you can simply display a message to the user saying "please go away" or similar - we can't tell you what precisely you should do, as that is determined by your customer requirements, and the look-n-feel of your site. – RB. Jan 17 '17 at 16:56

2 Answers2

0

Maybe you can try something like the following:

var userAgent = window.naviagtor.userAgent;
if (userAgent === 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';) {
     //is IE11
 }
Kody
  • 1,319
  • 1
  • 9
  • 12
0

I think IE11 still uses ActiveX, you can try to detect if the browser support ActiveX combine with user-agent.But this is not necessarily to say if the browser doesn't support ActiveX is not IE11, like security is on ...