0

I want to restrict my web application not to be supported in one certain browser alone. Browser may be anything and any version.

Brian Tompsett - 汤莱恩
  • 5,195
  • 62
  • 50
  • 120
  • http://stackoverflow.com/questions/9645803/whats-the-replacement-for-browser might help you to identify the browswer – asprin Oct 14 '13 at 07:46

1 Answers1

1

Why you don't want to support a particular browser? This is really not a good design because you shouldn't force a user.

In your case you have the only option of detecting browser using navigator.userAgent, which is not good.

If you don't want to support older version is IE or IE itself, then go with conditional comments.

For example:

<!--[if lt IE 9]>
<p>Sorry! You are running IE 8 or an earlier version of IE. <br>Please use IE 9 or greater</p>
<style>
     //Apply your own styles
</style>
<![endif]-->

Try to code which supports all latest browsers at least then based on the feature detection, change the design.

Praveen
  • 50,562
  • 29
  • 125
  • 152