you additionaly can surround the meta redirect with noscript tags: <script> <!--// index.html D=new Date() location.href='jstest.php?js=ok&t='+D.getTimezoneOffset() //--></script> <noscript> <meta http-equiv='refresh' content='0;url=jstest.php?js=no'> </noscript> tedd wrote: > > At 9:55 PM +0100 1/2/07, Satyam wrote: >>----- Original Message ----- From: "Robert Cummings" <robert@xxxxxxxxxxxxx> >>To: "Jürgen Wind" <jwind@xxxxxx> >>Cc: <php-general@xxxxxxxxxxxxx> >>Sent: Tuesday, January 02, 2007 8:57 PM >>Subject: Re: Javascript detection , working version >> >>>On Tue, 2007-01-02 at 11:32 -0800, Jürgen Wind wrote: >>>>Robert Cummings wrote: >>>>> >>>>> Out of curiosity, can you guarantee the Javascript redirect will >>>>> always >>>>> occur before the meta redirect when Javascript is enabled? Otherwise >>>>> > you >>>>> have a race condition. >>>>> >>>>> Cheers, >>>>> Rob. >>>>> >>>>i have no idea, it is just a quick&dirty hack, i'm no js expert ;) >>>>the js part is rather fast, maybe a little delay or window.write is >>>>neccessary after the redirect? >>> >>>No, you always want the javascript to run first. The question is whether >>>a meta redirect could ever occur before the javascript redirect. If it >>>can then occasionally you may get "javascript not detected" since the >>>meta redirect would occur when in fact javascript is enabled. >>> >>>Cheers, >>>Rob. >>>-- >> >>What I usually do is to make the entry page the >>one that would be used without JavaScript and >>branch only if JavaScript is present. >> >>Satyam > > To all: > > What I am doing is not branching to any other > page but rather if js is present then I use the > js enhancement and if not, then it's not there to > be used. In either case, the page works. It's > only an enhancement. In either case, there's no > race condition. > > tedd > -- > ------- > http://sperling.com http://ancientstones.com http://earthstones.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8250856 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php