How best to detect IE6?

What is the best way to detect IE6 to either re-direct to a safe IE6 page or display alternative IE6 safe content?

PHP? Javascript?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

As is the most reliable method?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

After looking round a bit I found this (Seems to work if you swap the User Agent in the Safari Developer Menu)


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Ahh… but its using external scripts to make this work

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>

I could do with me controlling the where the script are hosted.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You could go to http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js

and copy the code and host it on your site if the agreement allows.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Actually is very easy to incorporate into a Freeway page but…

There is a bit of code to kill/close the alert box

<script type="text/javascript">

// uses jquery fade 
function killIt(item){
		$(function(){
			$('#'+item).fadeOut(1000);
		});
	}			

But it does but work it does not close - any takers why not? Here’s the full code.

<?php

//**************************************//
//										//
//	Graceful IE6 Detect Advise w/jQuery	//
//		by: Joe Watkins					//
//		http://www.thatgrafix.com		//
//										//
//**************************************//

// IE6 string from user_agent
$ie6 = "MSIE 6.0";

// detect browser
$browser = $_SERVER['HTTP_USER_AGENT'];

// yank the version from the string
$browser = substr("$browser", 25, 8);

// html for error
$error = "<div class="error" id="error"><strong>Alert:</strong> It appears that you are using an out dated web browser Internet Explorer 6.  While you may still visit this website we encourage you to upgrade your web browser so you can enjoy all the rich features this website offers as well as other websites. Follow this link to <a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx"><strong>Upgrade your Internet Explorer</strong></a><br /><div class="kickRight"><a href="javascript: killIt('error');"> Close This Box</a></div></div>";

// if IE6 set the $alert 
if($browser == $ie6){ $alert = TRUE; }

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>Graceful IE6 Detect Advise w/jQuery</title>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<style type="text/css">

/* styles for error box */
.error {
	background:#FBE3E4;
	color:#8a1f11;
	border-color:#FBC2C4;
	padding:20px;
	border:dashed 2px red;
	width:90%;
	margin:0px auto;
	font-family:Arial, Arial, Helvetica, sans-serif;
	font-size:1em;
	line-height:1.3em;
}

.error a, .error a:hover{
	color:#8a1f11;
}

/* simply moves close box to right */
.kickRight {
	text-align:right;
}
</style>
<script type="text/javascript">
	
	// uses jquery fade 
   	function killIt(item){
			$(function(){
				$('#'+item).fadeOut(1000);
			});
		}			
</script>	
</head>
<body>
<!-- IE6 Detect Advise Notice -->
	<?php if($alert){ echo $error; } ?>
<!-- // end IE6 Detect Advise Notice -->
</body>
</html>





_______________________________________________
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Actually the “code to kill/close the alert box” code works in Firefox.

It must be just a Safari Bug.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Remember, if you use any of Freeway’s effects, these will conflict with jQuery, and the whole page will be broken. If you are using any part of Prototype on your page, you can use Prototype.Browser.IE as a test:

if(Prototype.Browser.IE){
    //do something to point out the folly of this
}

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

No I’m not using Prototype on the page. I’ve just got a conflict whereby the Freeway CSS menus don’t drop down over the top of a Flash animation in IE6. So I have two choices:-

LIve with it and point out to the user to upgrade (easiest option)

Or use PHP to replace the animation with say an animated gif if IE6 views the page.

Unless (thinking out aloud) I can get PHP to instruct flash to display an un-animated image, mmm… does a CSS menu drop down OK over static Flash image in IE6? That might stop a whole load of code swapping in the Freeway page.

On 15 Mar 2009, 2:45 am, waltd wrote:

Remember, if you use any of Freeway’s effects, these will conflict with jQuery, and the whole page will be broken. If you are using any part of Prototype on your page, you can use Prototype.Browser.IE as a test:

if(Prototype.Browser.IE){
    //do something to point out the folly of this
}

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

No it won’t help to swap one kind of Flash for another. The problem
here is that plug-ins (all of them, not just Flash) reserve their
entire airspace to themselves. If you draw a rectangle on your page
from x1,y1 to x2,y2 and put some Flash content in that rectangle, what
happens in the browser/plug-in model is that the browser “hands off”
that entire rectangle to the plug-in and makes IT responsible for
drawing anything there. So if the plug-in decides to accept input from
the browser then you will see whatever the plug-in decides to put
there from the outside world. In my experience, it’s not much. You
will easily find exceptions to this rule – some flavors of Safari and
certain versions of Flash will in fact play nice with one another –
but you will not find a solution to this short of re-writing all
versions of Flash (and IE) to behave like Safari and Flash 9+.

So, griping about the world time is over – let’s solve your problem.
What wizzy things are you doing with Flash on your page? Maybe they
can be done in Moo or jQuery or Scriptaculous, and you won’t need any
Flash. (My iPhone will thank you for that.)

Post a link to your design?

Walter

On Mar 15, 2009, at 8:26 AM, WebWorker wrote:

Unless (thinking out aloud) I can get PHP to instruct flash to
display an un-animated image, mmm… does a CSS menu drop down OK
over static Flash image in IE6? That might stop a whole load of
code swapping in the Freeway page.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Actually digging round the net and this forum I have not tried

wmode = transparent

I shall give this a go - it just might help for now.

In the longer run, yes iPhone would play the flash (or another PHP rule! come on apple!) but a simple “Scriptaculous” slideshow would work for this as its a only simple animation banner that QuarkXpress has output as Flash (its very quick to do this kind of stuff). But as the whole site is an inline box model site, I’m not sure how well a “Scriptaculous” slideshow will work inline with a CSS menu above it - I will have to test.

The site must be hidden for know - it has pricing not finalised that must not be seen by anyone yet.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Correction…

yes iPhone would NOT play the flash


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Further to this, though, iPhone (indeed, any browser) does not see PHP
– only the rendered HTML generated by PHP – so all HTML-compatible
browsers are PHP-compatible, even Lynx.

Walter

On Mar 15, 2009, at 8:54 AM, WebWorker wrote:

Correction…

yes iPhone would NOT play the flash


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes I know, I was meaning add iphone to the php detection script to replace the flash image along with IE6.

Checking a “Scriptaculous” slideshow it cannot be grouped and pasted into an inline object (unless I’ve done it wrong) Freeway says the ShowHide layer is incorrectly applied. Plus it makes a large 448k animation rather that a lean Flash file.

On 15 Mar 2009, 1:37 pm, waltd wrote:

Further to this, though, iPhone (indeed, any browser) does not see PHP
– only the rendered HTML generated by PHP – so all HTML-compatible
browsers are PHP-compatible, even Lynx.

Walter

On Mar 15, 2009, at 8:54 AM, WebWorker wrote:

Correction…

yes iPhone would NOT play the flash


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I would imagine that you might be seeing some smaller file sizes if
your lean Flash file was referencing external images, rather than
considering them as part of the page the way the Scriptaculous slide
show does. As to the layout issue, I would need to see how your file
was constructed to see what might be happening there. It’s certainly
possible to do, and I think it might end up being less obtrusive than
Flash. You would certainly know that it works everywhere, rather than
needing to sniff for different browsers.

Walter

On Mar 15, 2009, at 9:58 AM, WebWorker wrote:

Plus it makes a large 448k animation rather that a lean Flash file.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walt,

wmode = transparent

Fixed the Menu issue in IE6. So for now its OK to continue for now. But…

…for the future Version 2, using a Scriptaculous slide show would be better - i.e. include the iphone. The action assumes all items are separate layers. Bearing in mind my first thought was to group them and paste them inline into a div of my box model site - which does not work. An other way would be to spacebar-drag to each slide show picture into the inline div to position them absolutely above each other… And of course this does work :slight_smile:

Walter BTW what does iphone see (or not see) if there is a flash element on a page? White space?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

A blue question mark, much like Safari when there’s a missing plugin
or image.

Joe

On 16 Mar 2009, at 09:04, WebWorker wrote:

Hi Walt,

wmode = transparent

Fixed the Menu issue in IE6. So for now its OK to continue for now.
But…

…for the future Version 2, using a Scriptaculous slide show would
be better - i.e. include the iphone. The action assumes all items
are separate layers. Bearing in mind my first thought was to group
them and paste them inline into a div of my box model site - which
does not work. An other way would be to spacebar-drag to each slide
show picture into the inline div to position them absolutely above
each other… And of course this does work :slight_smile:

Walter BTW what does iphone see (or not see) if there is a flash
element on a page? White space?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options