-2

We all knows that IE has so many problems in opening html and rendering css files.

I want IE to show nothing when open a page.

How can I do this?

Arun P Johny
  • 384,651
  • 66
  • 527
  • 531
Ehsan
  • 2,273
  • 8
  • 36
  • 70
  • 3
    You should seriously start to make your application compatible at least with IE9. Its respect of standards is very good. – Denys Séguret Sep 26 '12 at 14:07
  • 6
    Ok, I'll admit this made me laugh – dsgriffin Sep 26 '12 at 14:07
  • IE is a pretty good browser these days, but even if it wasn't, that's a dispicable way to treat people who happen to be using it. – Quentin Sep 26 '12 at 14:07
  • Start by [providing the good headers](http://stackoverflow.com/questions/10305631/ie9-float-with-overflowhidden-and-table-width-100-not-displaying-properly/10305733#10305733). – Denys Séguret Sep 26 '12 at 14:08
  • 1
    You don't choose what your users view their site in. They do. Sorry. – SpaceBeers Sep 26 '12 at 14:08
  • 3
    Maybe you should consider instead of showing nothing to exploit f.e. the newest Java holes and try to write a exploit that installs Chrome or Firefox instead. That would be much more convenient. – akluth Sep 26 '12 at 14:08
  • 3
    The web is all about being inclusive. IE represents perhaps 20% of web users, excluding them (and any other browser you incorrectly identify as IE) is the antithesis of inclusiveness. – RobG Sep 26 '12 at 14:10
  • 1
    As others have said, IE9, or even 8, is a decent browser. You could put in a [banner](http://www.ie6countdown.com/join-us.aspx) recommending visitors using the dreadful IE6 to upgrade their browser. If you don't like IE at all, there are [other banners](http://theie9countdown.com/join-the-cause) – Xavi López Sep 26 '12 at 14:12
  • 4
    I don't understand these comments. He's not asking if it's a good practice blocking IE users, he's asking how to block a given browser. The reasoning behind that decision is his responsibility. Should I downvote people who asks about CSS3? Or Canvas? Or Javascript? Because I'm a fan of Internet Explorer 1.5... – albertedevigo Sep 26 '12 at 14:18
  • Duplicate question here: http://stackoverflow.com/questions/14690175/blocking-modern-ie/14690446#14690446 You'll note that this question wasn't closed; this is because (a) the questioner included more detail about what they'd already tried, so it looked like they'd put in some effort, and (b) they had a more legitimate reason for needing to do it. It's still not ideal, even then, but he got +9 votes and you got -3 for basically the same question. Gotta be something to learn from that. – SDC Feb 05 '13 at 13:40

2 Answers2

8

You can use conditional comments and clear out your page!

<!--[if IE]>
<script>
window.onload = function() {
    document.body.innerHTML = 'Please choose a better browser!';
}
</script>
<![endif]-->
techfoobar
  • 65,616
  • 14
  • 114
  • 135
  • 1
    not with IE10, you can't. – SDC Feb 05 '13 at 13:38
  • IE10 is pretty good. Which means you wont need to disable it for IE10 most likely. – techfoobar Feb 05 '13 at 13:43
  • the question didn't specify which versions of IE he wants to block. – SDC Feb 05 '13 at 13:45
  • Yes. But it begins with *"We all knows that IE has so many problems in opening html and rendering css files."* – techfoobar Feb 05 '13 at 13:47
  • 1
    Well, yes, but we also all know that's not true (even as far back as IE8 if you make a few allowances). The question itself is flawed, so we can't make assumptions about what he wants. – SDC Feb 05 '13 at 13:56
1

You can use this jQuery plugin too.

Amino
  • 563
  • 1
  • 9
  • 26