Separate page for IE help

Hi so i’m looking for hopefully a css snippet that will direct user of any IE explorer to a different page. If that not possible then maybe a java script code? It basically something that redirects an IE user to a completely different page when they go to my website.

Which versions of IE?

The most common way to do something like this would be Javascript and a meta redirect or set a new location.href or something.

The problem with this is, since it usually relies on user agent strings, you’ll catch the occasional IE spoofer (most often Opera).

Or, you could keep IE users on the same page, but use IE conditional comments (which will no longer work in IE10) to serve an overriding stylesheet, and simply have the same page with different styles. That could be fun : ) You can’t change the page with CSS though, just how it looks for the most part.

Oh I have to mention that this isn’t generally a nice thing to do. I recently got an email from Linkedin. The subject had some topic in it, but the message was a “Please open this mail in a client that supports HTML.” Pffff, I choose my email client so I can access over SSH, and I got rather pissed some web site thought it was going to tell me to use some cheesy graphical mail client.

I just deleted the mail rather than switch mail clients. The same goes for browser users: it’s easier to leave the site than to go download some other browser, which is usually what “IE’s other pages” usually go to: some message about how badly their browser sucks and is a cancer on the internets. True as that is, people either choose their software and are happy, or can’t change what they’re using and just get frustrated. Just saying.

i’m actually frustraded also. :smiley: :stuck_out_tongue: so how about a snippet of code.

For what, a Javascript redirect?
Assuming also a whole new domain…


if (navigator.userAgent.indexOf('MSIE') !=-1){location.href = "http://yourdomain.com/newpage.html";}

otherwise you just want location.pathname

You could also try feature detection…


if (element.attachEvent){location.pathname = "/newpage.html";}

though this won’t work on any IE that’s stopped using attachEvent… you could try some other IE-only JScript properties.

Don’t let anyone tell you this is a good idea. I’ve just handed you some hanging rope.

thanks, how about an alert with links to a browser like firefox, chrome, or safari when ANY internet explorer accesses the site? :smiley:

example :

the code for the box


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">


<head>


<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Blah</title>
<link rel="stylesheet" href="css/pagecode.css">

<style type="text/css">
 div#alertA {
	width : 1244px;
	height : 46px;
	border : 2px solid rgb(0,128,2);
	 }
</style>

</head>
<body>
<div id="alertA">

</div>
</body>
</html>


Enclose the HTML markup intended for IE in a conditional comment that targets all versions (back to IE5).

<!--[if IE]><div id="alertA">

Links to other browsers.

</div><![endif]-->

hi there, first off thanks. I’ve seen this conditional statement before, but i couldn’t find one that target all IE users haha, and this one works back to those using IE 5. I’ll make sure that of course you can see a test site in any Internet Explorer version, by using VMware fusion to test it here and there. I not sure if any has herd of VMware fusion, but it’s the quickest solution to seeing a random site in action in IE, for a Macintosh user.

Thanks,

Daniel Jenkins (Polyhedra)

As I understand it, IE10 drops support for CC’s.

Also: not all of the IE emulators properly work with CC’s. For example, on one VirtualBox with a “real” IE7, I also have a Tredosoft Multiple IE’s package for IE6. On another VirtualBox I have a “native” IE6. The native IE6 reacts correctly to CC’s, but the Tredosoft IE6 tends to believe its version-number is the same as the highest-installed version of IE (so in my case, IE6 thinks it’s IE7, and any CC’s targeting only IE6 are ignored as if it were IE7). CSS, however, is treated correctly for the most part: * html #element{} styles hit IE6 whether Tredosoft/emulator version or not.

I’ve used * html comments to show an otherwise hidden bit of text suggesting the user check out other browsers. Since I knew our insurance sites were being visited by many offices, it was only a suggestion since the average office monkey did not have the privileges to update their browsers anyway.