[thelist] user agent bookmarklet/favlet for IE

Mark Groen mark at markgroen.com
Mon May 3 20:58:22 CDT 2004


----- Original Message ----- 
From: "Sarah Sweeney" <mr.sanders at designshift.com>
To: "Evolt - thelist" <thelist at lists.evolt.org>
Sent: May 3, 2004 10:13 AM
Subject: [thelist] user agent bookmarklet/favlet for IE


> I am using the multiple versions of IE as described in this
article:
> http://www.insert-title.com/web_design/?page=articles/dev/multi_IE
>
> About 2/3 of the way down, it says:
> "And while the about screen may have info showing IE 6.0 the
browser is
> rendering as IE5 or 5.5."
>
> Is there a bookmarklet/favlet I can use that will tell me the
correct
> user agent so that I can confirm that I am using the version I
think I'm

Not as nice as a bookmarklet, but it works, create a "keepieapart.js"
file with this:

if (document.all)
{
 var detect = navigator.userAgent.toLowerCase();
 var browser,thestring;
 var version = 0;

 if (checkIt('msie'))
 {
  browser = "IE "
  browser += detect.substr(place + thestring.length,3);
  document.title = browser + ' - ' + document.title;
 }
}

function checkIt(string)
{
 place = detect.indexOf(string) + 1;
 thestring = string;
 return place;
}

Then put this in the head, right after the title:
<title>Untitled</title><script src="keepieapart.js"
type="text/javascript"></script>

hth!

cheers,

       Mark





More information about the thelist mailing list