I want to check if user’s browser support query, if it don’t the webpage will not show and just show a sentence say your browser can’t view the page. but without Jquery , I don’t know much about original javascript how to do #('body').html('u cant view the page'); something like that.
I want to check if user’s browser support query, if it don’t the webpage
Share
You can put this at the top of your HTML:
And if you do this too:
It will redirect visitors to a page (without the above…) that will tell them how much you dislike their browser. And if the redirect takes a moment, then whatever. They get a blank page while they wait.
Note, this doesn’t take into account other browsers for which you have a less than tepid appreciation for. Opera? Nope. Firefox? Nada. Maxthon? Is that still around? Safari? Uh huh. Not that one either.
So this will only work if it’s IE for which you have a particular dislike. Otherwise, you would probably want to include a script include that did a redirect based on a browser sniff of some kind. Note, those are notoriously easy to defeat.
But, if you desire to hamstring those few Netscape diehards still around, check out Quirksmode’s browser detect article. It’s, um, thorough.