What I want to do is to check through a conditional comment if a user is using IE6,7 or 8 and if he does then I want to load a different html file than my index.php.
I have been instructed to use a javascript like the one below:
$(document).ready(function(){
$(body).html('Please download firefox or chrome to view this site');});
and then use the normal conditional comment structure with tag including the js file, but for some reason this doesn’t work.
Additionally as I said above I want to redirect the users in a new html file ex.main.html instead of index.php, if they are using IE as their browser. I do not want to use html code inside the comment, I want to somehow force the user be redirected to the new file.
Any ideas or guidance will be greatly appreciated. Thanks in advance.
The simple solution, without JavaScript would look like this (put this in your
<head>):This would redirect the user to
http://example.com/ie.html(Just replace that part with the actual URL). Advantage of this solution: It does also work, if the user has deactivated JavaScript.